pub enum Widget<U>where
U: Ui,{
Passive(RwData<dyn PassiveWidget<U>>, &'static str),
Active(Arc<dyn ActiveHolder<U>>),
}Variants§
Implementations§
source§impl<U> Widget<U>where
U: Ui,
impl<U> Widget<U>where
U: Ui,
pub fn passive<W>(widget: W) -> Selfwhere
W: PassiveWidget<U>,
pub fn active<W, I>(widget: W, input: RwData<I>) -> Selfwhere
W: ActiveWidget<U>,
I: InputMethod<U, Widget = W>,
pub fn update_and_print(&self, area: &U::Area)
sourcepub fn downcast<W>(&self) -> Option<RwData<W>>where
W: PassiveWidget<U>,
pub fn downcast<W>(&self) -> Option<RwData<W>>where
W: PassiveWidget<U>,
Returns the downcast ref of this Widget.
pub fn data_is<W>(&self) -> boolwhere
W: 'static,
pub fn inspect_as<W, B>(&self, f: impl FnOnce(&W) -> B) -> Option<B>where
W: PassiveWidget<U>,
pub fn as_passive(&self) -> &RwData<dyn PassiveWidget<U>>
pub fn as_active( &self, ) -> Option<(&RwData<dyn ActiveWidget<U>>, &RwData<dyn InputMethod<U>>)>
pub fn input(&self) -> Option<&RwData<dyn InputMethod<U>>>
pub fn ptr_eq<W, D>(&self, other: &D) -> bool
pub fn update(&self, area: &U::Area)
pub fn type_name(&self) -> &'static str
Trait Implementations§
Auto Trait Implementations§
impl<U> !Freeze for Widget<U>
impl<U> !RefUnwindSafe for Widget<U>
impl<U> Send for Widget<U>
impl<U> Sync for Widget<U>
impl<U> Unpin for Widget<U>
impl<U> !UnwindSafe for Widget<U>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)