Struct oxygengine_user_interface::widget::context::WidgetContext
source · [−]pub struct WidgetContext<'a, 'b> {
pub id: &'a WidgetId,
pub idref: Option<&'a WidgetRef>,
pub key: &'a str,
pub props: &'a mut Props,
pub shared_props: &'a mut Props,
pub state: State<'a>,
pub animator: &'a AnimatorStates,
pub life_cycle: &'a mut WidgetLifeCycle,
pub named_slots: HashMap<String, WidgetNode, RandomState>,
pub listed_slots: Vec<WidgetNode, Global>,
pub process_context: &'a mut ProcessContext<'b>,
}
Fields
id: &'a WidgetId
idref: Option<&'a WidgetRef>
key: &'a str
props: &'a mut Props
state: State<'a>
animator: &'a AnimatorStates
life_cycle: &'a mut WidgetLifeCycle
named_slots: HashMap<String, WidgetNode, RandomState>
listed_slots: Vec<WidgetNode, Global>
process_context: &'a mut ProcessContext<'b>
Implementations
sourceimpl<'a, 'b> WidgetContext<'a, 'b>
impl<'a, 'b> WidgetContext<'a, 'b>
pub fn take_named_slots(&mut self) -> HashMap<String, WidgetNode, RandomState>
pub fn take_named_slot(&mut self, name: &str) -> WidgetNode
pub fn take_listed_slots(&mut self) -> Vec<WidgetNode, Global>
pub fn use_hook<F>(&mut self, f: F) -> &mut WidgetContext<'a, 'b>where
F: FnMut(&mut WidgetContext<'a, 'b>),
Trait Implementations
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for WidgetContext<'a, 'b>
impl<'a, 'b> !Send for WidgetContext<'a, 'b>
impl<'a, 'b> !Sync for WidgetContext<'a, 'b>
impl<'a, 'b> Unpin for WidgetContext<'a, 'b>where
'b: 'a,
impl<'a, 'b> !UnwindSafe for WidgetContext<'a, 'b>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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