pub struct TypographyTheme { /* private fields */ }Expand description
One complete retained typography value with all eighteen semantic roles.
Implementations§
Source§impl TypographyTheme
impl TypographyTheme
Sourcepub fn new(
root: RootTextRoles,
axes: AxisTextRoles,
guides: GuideTextRoles,
composition: CompositionTextRoles,
annotations: AnnotationTextRoles,
) -> Result<Self, Error>
pub fn new( root: RootTextRoles, axes: AxisTextRoles, guides: GuideTextRoles, composition: CompositionTextRoles, annotations: AnnotationTextRoles, ) -> Result<Self, Error>
Construct all complete text roles and validate their invariants.
Sourcepub fn get_root(&self) -> &RootTextRoles
pub fn get_root(&self) -> &RootTextRoles
Borrow the independent root text role.
Sourcepub fn root(self, value: RootTextRoles) -> Result<Self, Error>
pub fn root(self, value: RootTextRoles) -> Result<Self, Error>
Replace only root, validating the complete role group.
Sourcepub fn get_axes(&self) -> &AxisTextRoles
pub fn get_axes(&self) -> &AxisTextRoles
Borrow the independent axes text role.
Sourcepub fn axes(self, value: AxisTextRoles) -> Result<Self, Error>
pub fn axes(self, value: AxisTextRoles) -> Result<Self, Error>
Replace only axes, validating the complete role group.
Sourcepub fn get_guides(&self) -> &GuideTextRoles
pub fn get_guides(&self) -> &GuideTextRoles
Borrow the independent guides text role.
Sourcepub fn guides(self, value: GuideTextRoles) -> Result<Self, Error>
pub fn guides(self, value: GuideTextRoles) -> Result<Self, Error>
Replace only guides, validating the complete role group.
Sourcepub fn get_composition(&self) -> &CompositionTextRoles
pub fn get_composition(&self) -> &CompositionTextRoles
Borrow the independent composition text role.
Sourcepub fn composition(self, value: CompositionTextRoles) -> Result<Self, Error>
pub fn composition(self, value: CompositionTextRoles) -> Result<Self, Error>
Replace only composition, validating the complete role group.
Sourcepub fn get_annotations(&self) -> &AnnotationTextRoles
pub fn get_annotations(&self) -> &AnnotationTextRoles
Borrow the independent annotations text role.
Sourcepub fn annotations(self, value: AnnotationTextRoles) -> Result<Self, Error>
pub fn annotations(self, value: AnnotationTextRoles) -> Result<Self, Error>
Replace only annotations, validating the complete role group.
Trait Implementations§
Source§impl Clone for TypographyTheme
impl Clone for TypographyTheme
Source§impl Debug for TypographyTheme
impl Debug for TypographyTheme
Source§impl PartialEq for TypographyTheme
impl PartialEq for TypographyTheme
impl StructuralPartialEq for TypographyTheme
Auto Trait Implementations§
impl Forget for TypographyTheme
impl Freeze for TypographyThemewhere
*const ArcInner<Vec<FontFamily>> is !null: Freeze,
PhantomData<ArcInner<Vec<FontFamily>>>: Freeze,
impl Move for TypographyTheme
impl RefUnwindSafe for TypographyTheme
impl Send for TypographyTheme
impl Sync for TypographyTheme
impl Unpin for TypographyTheme
impl UnsafeUnpin for TypographyThemewhere
*const ArcInner<Vec<FontFamily>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<FontFamily>>>: UnsafeUnpin,
impl UnwindSafe for TypographyTheme
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> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.