pub struct MolTextSpec {
pub content: String,
pub pos: Option<LabelPos>,
pub scale: Option<f64>,
pub color: Option<String>,
pub place: Option<RegionTextPlace>,
pub margin: Option<f64>,
}Expand description
Expanded text content for mol name, region labels, callouts, atom labels.
Fields§
§content: StringDisplay string — chem label markup ($R_1$, N^+, **bold**, …).
pos: Option<LabelPos>Side relative to the anchor (mol name / outside region label).
scale: Option<f64>Font scale relative to house atom-label size (mol name defaults to 1.5×).
color: Option<String>CSS color.
place: Option<RegionTextPlace>Region label: inside the hull or outside (default outside).
margin: Option<f64>Gap (px) between mol ink AABB and this caption (snug, no clash).
Omit → house default (see caption paint CAPTION_MARGIN_DEFAULT).
Trait Implementations§
Source§impl Clone for MolTextSpec
impl Clone for MolTextSpec
Source§fn clone(&self) -> MolTextSpec
fn clone(&self) -> MolTextSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MolTextSpec
impl Debug for MolTextSpec
Source§impl Default for MolTextSpec
impl Default for MolTextSpec
Source§fn default() -> MolTextSpec
fn default() -> MolTextSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MolTextSpec
impl<'de> Deserialize<'de> for MolTextSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MolTextSpec
impl PartialEq for MolTextSpec
Source§impl Serialize for MolTextSpec
impl Serialize for MolTextSpec
impl StructuralPartialEq for MolTextSpec
Auto Trait Implementations§
impl Freeze for MolTextSpec
impl RefUnwindSafe for MolTextSpec
impl Send for MolTextSpec
impl Sync for MolTextSpec
impl Unpin for MolTextSpec
impl UnsafeUnpin for MolTextSpec
impl UnwindSafe for MolTextSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more