pub enum TypeRole {
Show 15 variants
DisplayLarge,
DisplayMedium,
DisplaySmall,
HeadlineLarge,
HeadlineMedium,
HeadlineSmall,
TitleLarge,
TitleMedium,
TitleSmall,
BodyLarge,
BodyMedium,
BodySmall,
LabelLarge,
LabelMedium,
LabelSmall,
}Expand description
A role in the reference Material type scale.
Variants§
DisplayLarge
DisplayMedium
DisplaySmall
HeadlineLarge
HeadlineMedium
HeadlineSmall
TitleLarge
TitleMedium
TitleSmall
BodyLarge
BodyMedium
BodySmall
LabelLarge
LabelMedium
LabelSmall
Implementations§
Source§impl TypeRole
impl TypeRole
pub const ALL: [Self; 15]
pub const fn name(self) -> &'static str
Sourcepub const fn typeface(self) -> TypefaceRole
pub const fn typeface(self) -> TypefaceRole
The kit’s Static/<Role>/Font variables: display, headline and
title-large use the brand face; title-medium, title-small, body and
label the plain.
Sourcepub const fn scale(self) -> TypeScale
pub const fn scale(self) -> TypeScale
The role’s metrics (size, line height and tracking in px at 100%).
Sourcepub const fn emphasized(self) -> TypeScale
pub const fn emphasized(self) -> TypeScale
The role’s M3 Expressive emphasized style (the kit’s
M3/<group>/<size>-emphasized): the same face, size, line height and
tracking with the Weight-emphasized weight, Medium (500) for regular
roles and SemiBold (600) for medium ones.
Trait Implementations§
impl Copy for TypeRole
impl Eq for TypeRole
impl StructuralPartialEq for TypeRole
Auto Trait Implementations§
impl Freeze for TypeRole
impl RefUnwindSafe for TypeRole
impl Send for TypeRole
impl Sync for TypeRole
impl Unpin for TypeRole
impl UnsafeUnpin for TypeRole
impl UnwindSafe for TypeRole
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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