Struct SectionHeader
pub struct SectionHeader { /* private fields */ }Expand description
A section’s header row.
Implementations§
§impl SectionHeader
impl SectionHeader
pub fn heading(title: impl Into<String>) -> SectionHeader
pub fn heading(title: impl Into<String>) -> SectionHeader
A section of a page, titled in Heading.
pub fn group(title: impl Into<String>) -> SectionHeader
pub fn group(title: impl Into<String>) -> SectionHeader
A group inside a section (or a list’s section header), titled in
Subheading.
pub fn count(self, count: usize) -> SectionHeader
pub fn count(self, count: usize) -> SectionHeader
How many items the section holds, in a quiet pill after the title.
pub fn stated_count(&self) -> Option<usize>
pub fn stated_count(&self) -> Option<usize>
How many it says the section holds (Self::count).
pub fn action(self, button: Button) -> SectionHeader
pub fn action(self, button: Button) -> SectionHeader
One trailing text action that acts on the whole section. Its label ends on the trailing edge.
pub fn trailing(self, element: Box<dyn Widget>) -> SectionHeader
pub fn trailing(self, element: Box<dyn Widget>) -> SectionHeader
One element on the trailing edge that speaks for the whole group:
the switch that turns it on or off, or its status as a badge. It
stands before the Self::action when there is one.
pub fn leading(self, element: Box<dyn Widget>) -> SectionHeader
pub fn leading(self, element: Box<dyn Widget>) -> SectionHeader
A non-interactive identity element immediately before the title. It participates in layout, drawing and the accessibility tree.
pub fn into_element(self) -> Box<dyn Widget>
pub fn into_element(self) -> Box<dyn Widget>
The header as a widget of its own: the head of a card or a panel that is not a
Section.
Auto Trait Implementations§
impl Freeze for SectionHeader
impl !RefUnwindSafe for SectionHeader
impl !Send for SectionHeader
impl !Sync for SectionHeader
impl Unpin for SectionHeader
impl UnsafeUnpin for SectionHeader
impl !UnwindSafe for SectionHeader
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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