Expand description
The internal State
of a widget.
Variants
None
No meaningful internal state.
Some(Box<dyn Any>)
Some meaningful internal state.
Implementations
sourceimpl State
impl State
sourcepub fn downcast_ref<T>(&self) -> &T where
T: 'static,
pub fn downcast_ref<T>(&self) -> &T where
T: 'static,
Downcasts the State
to T
and returns a reference to it.
Panics
This method will panic if the downcast fails or the State
is State::None
.
sourcepub fn downcast_mut<T>(&mut self) -> &mut T where
T: 'static,
pub fn downcast_mut<T>(&mut self) -> &mut T where
T: 'static,
Downcasts the State
to T
and returns a mutable reference to it.
Panics
This method will panic if the downcast fails or the State
is State::None
.
Auto Trait Implementations
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more