Skip to main content

ExpansionPanel

Struct ExpansionPanel 

Source
pub struct ExpansionPanel<Msg = Callback> { /* private fields */ }
Expand description

One panel of an ExpansionPanelList: a header and what it hides.

Implementations§

Source§

impl<Msg> ExpansionPanel<Msg>

Source

pub fn new(title: impl Into<String>, body: impl Widget<Msg> + 'static) -> Self

A panel with a title, hiding body.

Source

pub fn with_header( header: impl Widget<Msg> + 'static, body: impl Widget<Msg> + 'static, ) -> Self
where Msg: 'static,

A panel whose header is a widget — the reference’s headerBuilder, for a row of chips, a rich span, a badge beside a name.

The chevron and the tap target stay the list’s: what this replaces is the line of text, not the row it sits in.

Source

pub fn subtitle(self, subtitle: impl Into<String>) -> Self

A second line under the title.

Auto Trait Implementations§

§

impl<Msg = Callback> !Freeze for ExpansionPanel<Msg>

§

impl<Msg = Callback> !RefUnwindSafe for ExpansionPanel<Msg>

§

impl<Msg = Callback> !Send for ExpansionPanel<Msg>

§

impl<Msg = Callback> !Sync for ExpansionPanel<Msg>

§

impl<Msg = Callback> !UnwindSafe for ExpansionPanel<Msg>

§

impl<Msg> Unpin for ExpansionPanel<Msg>
where RefCell<Option<Box<dyn Widget<Msg>>>>: Unpin,

§

impl<Msg> UnsafeUnpin for ExpansionPanel<Msg>
where RefCell<Option<Box<dyn Widget<Msg>>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Msg> IntoMsg<Msg> for Msg

Source§

fn defer(work: impl Fn() -> Msg + 'static) -> Msg

The message that stands for work’s result.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.