pub enum TopAppBarVariant {
Small,
CenterAligned,
MediumFlexible,
LargeFlexible,
Search,
}Expand description
The kit’s top app bar configurations.
Variants§
Small
Title after the navigation icon, 64dp.
CenterAligned
Title centered across the bar, 64dp.
MediumFlexible
A headline-medium title under the icons that collapses into a small bar on scroll; 112dp expanded (136dp with a subtitle).
LargeFlexible
A display-small title under the icons that collapses into a small bar on scroll; 120dp expanded (152dp with a subtitle).
Search
A search field between the navigation icon and the actions, 64dp.
Implementations§
Source§impl TopAppBarVariant
impl TopAppBarVariant
pub const ALL: [Self; 5]
pub const fn name(self) -> &'static str
pub const fn is_flexible(self) -> bool
Sourcepub const fn title_roles(self) -> (TypeRole, TypeRole)
pub const fn title_roles(self) -> (TypeRole, TypeRole)
The title and subtitle roles of the bar’s (expanded) title.
Sourcepub const fn subtitle_gap(self) -> f32
pub const fn subtitle_gap(self) -> f32
Space between the title and its subtitle.
Sourcepub fn expanded_height(self, subtitle: bool) -> f32
pub fn expanded_height(self, subtitle: bool) -> f32
Expanded height in design px.
Sourcepub fn collapse_fraction(self, subtitle: bool, offset: f32) -> f32
pub fn collapse_fraction(self, subtitle: bool, offset: f32) -> f32
How far a flexible bar has collapsed at offset (0 expanded, 1
collapsed); single-row bars never collapse.
Trait Implementations§
Source§impl Clone for TopAppBarVariant
impl Clone for TopAppBarVariant
Source§fn clone(&self) -> TopAppBarVariant
fn clone(&self) -> TopAppBarVariant
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 moreimpl Copy for TopAppBarVariant
Source§impl Debug for TopAppBarVariant
impl Debug for TopAppBarVariant
Source§impl Default for TopAppBarVariant
impl Default for TopAppBarVariant
Source§fn default() -> TopAppBarVariant
fn default() -> TopAppBarVariant
Returns the “default value” for a type. Read more
impl Eq for TopAppBarVariant
Source§impl PartialEq for TopAppBarVariant
impl PartialEq for TopAppBarVariant
impl StructuralPartialEq for TopAppBarVariant
Auto Trait Implementations§
impl Freeze for TopAppBarVariant
impl RefUnwindSafe for TopAppBarVariant
impl Send for TopAppBarVariant
impl Sync for TopAppBarVariant
impl Unpin for TopAppBarVariant
impl UnsafeUnpin for TopAppBarVariant
impl UnwindSafe for TopAppBarVariant
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().