pub struct CompositionTextRoles { /* private fields */ }Expand description
Independent facet, composition, and embedded-prose text roles.
Implementations§
Source§impl CompositionTextRoles
impl CompositionTextRoles
Sourcepub fn new(
facet_header: TextTheme,
composition_header: TextTheme,
text_panel_title: TextTheme,
body: TextTheme,
) -> Result<Self, Error>
pub fn new( facet_header: TextTheme, composition_header: TextTheme, text_panel_title: TextTheme, body: TextTheme, ) -> Result<Self, Error>
Construct all complete text roles and validate their invariants.
Sourcepub fn get_facet_header(&self) -> &TextTheme
pub fn get_facet_header(&self) -> &TextTheme
Borrow the independent facet_header text role.
Sourcepub fn facet_header(self, value: TextTheme) -> Result<Self, Error>
pub fn facet_header(self, value: TextTheme) -> Result<Self, Error>
Replace only facet_header, validating the complete role group.
Sourcepub fn get_composition_header(&self) -> &TextTheme
pub fn get_composition_header(&self) -> &TextTheme
Borrow the independent composition_header text role.
Sourcepub fn composition_header(self, value: TextTheme) -> Result<Self, Error>
pub fn composition_header(self, value: TextTheme) -> Result<Self, Error>
Replace only composition_header, validating the complete role group.
Sourcepub fn get_text_panel_title(&self) -> &TextTheme
pub fn get_text_panel_title(&self) -> &TextTheme
Borrow the independent text_panel_title text role.
Sourcepub fn text_panel_title(self, value: TextTheme) -> Result<Self, Error>
pub fn text_panel_title(self, value: TextTheme) -> Result<Self, Error>
Replace only text_panel_title, validating the complete role group.
Trait Implementations§
Source§impl Clone for CompositionTextRoles
impl Clone for CompositionTextRoles
Source§impl Debug for CompositionTextRoles
impl Debug for CompositionTextRoles
Source§impl PartialEq for CompositionTextRoles
impl PartialEq for CompositionTextRoles
impl StructuralPartialEq for CompositionTextRoles
Auto Trait Implementations§
impl Forget for CompositionTextRoles
impl Freeze for CompositionTextRoleswhere
*const ArcInner<Vec<FontFamily>> is !null: Freeze,
PhantomData<ArcInner<Vec<FontFamily>>>: Freeze,
impl Move for CompositionTextRoles
impl RefUnwindSafe for CompositionTextRoles
impl Send for CompositionTextRoles
impl Sync for CompositionTextRoles
impl Unpin for CompositionTextRoles
impl UnsafeUnpin for CompositionTextRoleswhere
*const ArcInner<Vec<FontFamily>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<FontFamily>>>: UnsafeUnpin,
impl UnwindSafe for CompositionTextRoles
Blanket Implementations§
impl<T> Allocation for T
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.