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() -> ScaffoldInfo
pub fn of() -> ScaffoldInfo
The one in force here — empty outside every ScaffoldInfo::scope.
Sourcepub fn with_drawer<Msg>(self, toggle: Msg) -> ScaffoldInfowhere
Msg: Clone + 'static,
pub fn with_drawer<Msg>(self, toggle: Msg) -> ScaffoldInfowhere
Msg: Clone + 'static,
Records a leading drawer and the message that toggles it.
Sourcepub fn with_end_drawer<Msg>(self, toggle: Msg) -> ScaffoldInfowhere
Msg: Clone + 'static,
pub fn with_end_drawer<Msg>(self, toggle: Msg) -> ScaffoldInfowhere
Msg: Clone + 'static,
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>(&self) -> Option<Msg>where
Msg: Clone + 'static,
pub fn drawer_toggle<Msg>(&self) -> Option<Msg>where
Msg: Clone + 'static,
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>(&self) -> Option<Msg>where
Msg: Clone + 'static,
pub fn end_drawer_toggle<Msg>(&self) -> Option<Msg>where
Msg: Clone + 'static,
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.
Trait Implementations§
Source§impl Clone for ScaffoldInfo
impl Clone for ScaffoldInfo
Source§fn clone(&self) -> ScaffoldInfo
fn clone(&self) -> ScaffoldInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ScaffoldInfo
impl Default for ScaffoldInfo
Source§fn default() -> ScaffoldInfo
fn default() -> ScaffoldInfo
Auto Trait Implementations§
impl !RefUnwindSafe for ScaffoldInfo
impl !Send for ScaffoldInfo
impl !Sync for ScaffoldInfo
impl !UnwindSafe for ScaffoldInfo
impl Freeze for ScaffoldInfo
impl Unpin for ScaffoldInfo
impl UnsafeUnpin for ScaffoldInfo
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
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.