pub struct ScaffoldInfo { /* private fields */ }Expand description
What the Scaffold around a widget knows about itself.
Empty outside a shell — which is not the same as “a shell with nothing in it”, but the two want the same answers here, and a bar outside a shell has no drawer to open either way.
Implementations§
Source§impl ScaffoldInfo
impl ScaffoldInfo
Sourcepub fn of() -> Self
pub fn of() -> Self
The one in force here — empty outside every ScaffoldInfo::scope.
Sourcepub fn with_drawer<Msg: Clone + 'static>(self, toggle: Msg) -> Self
pub fn with_drawer<Msg: Clone + 'static>(self, toggle: Msg) -> Self
Records a leading drawer and the message that toggles it.
Sourcepub fn with_end_drawer<Msg: Clone + 'static>(self, toggle: Msg) -> Self
pub fn with_end_drawer<Msg: Clone + 'static>(self, toggle: Msg) -> Self
Records a trailing drawer and the message that toggles it.
Sourcepub fn has_drawer(&self) -> bool
pub fn has_drawer(&self) -> bool
Whether the shell has a drawer on the leading edge.
Sourcepub fn has_end_drawer(&self) -> bool
pub fn has_end_drawer(&self) -> bool
Whether the shell has a drawer on the trailing edge.
Sourcepub fn drawer_toggle<Msg: Clone + 'static>(&self) -> Option<Msg>
pub fn drawer_toggle<Msg: Clone + 'static>(&self) -> Option<Msg>
The message that toggles the leading drawer, for a widget whose message type it
is. None for anyone else: a widget cannot send a message of another tree’s
type, so being told about it would only invite a cast.
Sourcepub fn end_drawer_toggle<Msg: Clone + 'static>(&self) -> Option<Msg>
pub fn end_drawer_toggle<Msg: Clone + 'static>(&self) -> Option<Msg>
The same for the trailing drawer.
Sourcepub fn install(self) -> ScaffoldGuard
pub fn install(self) -> ScaffoldGuard
Puts this in force until the guard is dropped.