pub struct Widget(_);
Implementations
sourceimpl Widget
impl Widget
pub fn build(
self,
state: &mut dyn dyn_context_State,
f: impl for<'builder_lt> FnOnce(Builder<'builder_lt, Self>) -> Builder<'builder_lt, Self>
) -> Self
pub fn new<O: WidgetObj>(state: &mut dyn State, obj: O) -> Widget
pub fn drop_widget(self, state: &mut dyn State)
pub fn load<X: Convenient>(
self,
state: &mut dyn State,
parent: View,
prev: Option<View>,
init: impl FnOnce(&mut dyn State, View)
) -> Re<X>
pub fn unload<X: Convenient>(self, state: &mut dyn State) -> Re<X>
pub fn view(self, tree: &WidgetTree) -> Option<View>
pub fn focus(self, state: &mut dyn State)
Trait Implementations
sourceimpl DepObj<WidgetBase, WidgetBase> for Widget
impl DepObj<WidgetBase, WidgetBase> for Widget
const STATE_PART: std_any_TypeId = ::dep_obj::std_any_TypeId::of::()
fn get_raw<'state_part_lifetime>(
state_part: &'state_part_lifetime dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime WidgetBase
fn get_raw_mut<'state_part_lifetime>(
state_part: &'state_part_lifetime mut dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime mut WidgetBase
fn get(
state: &(dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjRef<'_, Type>
fn get_mut(
state: &mut (dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjMut<'_, Type>
sourceimpl<DepObjType: WidgetObj + DepType<Id = Self>> DepObj<WidgetObjKey, DepObjType> for Widget
impl<DepObjType: WidgetObj + DepType<Id = Self>> DepObj<WidgetObjKey, DepObjType> for Widget
const STATE_PART: std_any_TypeId = ::dep_obj::std_any_TypeId::of::()
fn get_raw<'state_part_lifetime>(
state_part: &'state_part_lifetime dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime DepObjType
fn get_raw_mut<'state_part_lifetime>(
state_part: &'state_part_lifetime mut dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime mut DepObjType
fn get(
state: &(dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjRef<'_, Type>
fn get_mut(
state: &mut (dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjMut<'_, Type>
sourceimpl Ord for Widget
impl Ord for Widget
sourceimpl PartialOrd<Widget> for Widget
impl PartialOrd<Widget> for Widget
sourcefn partial_cmp(&self, other: &Widget) -> Option<Ordering>
fn partial_cmp(&self, other: &Widget) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Widget
impl DetachedDepObjId for Widget
impl Eq for Widget
impl StructuralEq for Widget
impl StructuralPartialEq for Widget
Auto Trait Implementations
impl !RefUnwindSafe for Widget
impl Send for Widget
impl Sync for Widget
impl Unpin for Widget
impl !UnwindSafe for Widget
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
sourceimpl<T> DepObjId for T where
T: DetachedDepObjId,
impl<T> DepObjId for T where
T: DetachedDepObjId,
fn parent(self, _state: &(dyn State + 'static)) -> Option<T>
fn next(self, _state: &(dyn State + 'static)) -> T
fn first_child(self, _state: &(dyn State + 'static)) -> Option<T>
fn add_binding_raw<Owner, T>(
self,
state: &mut (dyn State + 'static),
binding: BindingBase<T>
) where
Owner: DepType<Id = Self> + 'static,
T: Convenient,
<Owner as DepType>::Id: DepObj<<Owner as DepType>::DepObjKey, Owner>,
fn add_binding<Owner, T>(
self,
state: &mut (dyn State + 'static),
binding: impl Into<BindingBase<T>>
) where
Owner: DepType<Id = Self> + 'static,
T: Convenient,
<Owner as DepType>::Id: DepObj<<Owner as DepType>::DepObjKey, Owner>,
fn apply_style<Owner>(
self,
state: &mut (dyn State + 'static),
style: Option<Style<Owner>>
) -> Option<Style<Owner>> where
Owner: DepType<Id = Self>,
<Owner as DepType>::Id: DepObj<<Owner as DepType>::DepObjKey, Owner>,
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert 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
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more