pub struct Slot<ParentState, ParentAction, ChildState, ChildAction> {
pub get: fn(&ParentState) -> Option<&ChildState>,
pub get_mut: fn(&mut ParentState) -> Option<&mut ChildState>,
pub embed: fn(ChildAction) -> ParentAction,
pub child_update: fn(&mut ChildState, ChildAction) -> Cmd<ChildAction>,
}Expand description
Scoped child slot — lifts child update into parent state/action space.
Fields§
§get: fn(&ParentState) -> Option<&ChildState>§get_mut: fn(&mut ParentState) -> Option<&mut ChildState>§embed: fn(ChildAction) -> ParentAction§child_update: fn(&mut ChildState, ChildAction) -> Cmd<ChildAction>Implementations§
Auto Trait Implementations§
impl<ParentState, ParentAction, ChildState, ChildAction> Freeze for Slot<ParentState, ParentAction, ChildState, ChildAction>
impl<ParentState, ParentAction, ChildState, ChildAction> RefUnwindSafe for Slot<ParentState, ParentAction, ChildState, ChildAction>
impl<ParentState, ParentAction, ChildState, ChildAction> Send for Slot<ParentState, ParentAction, ChildState, ChildAction>
impl<ParentState, ParentAction, ChildState, ChildAction> Sync for Slot<ParentState, ParentAction, ChildState, ChildAction>
impl<ParentState, ParentAction, ChildState, ChildAction> Unpin for Slot<ParentState, ParentAction, ChildState, ChildAction>
impl<ParentState, ParentAction, ChildState, ChildAction> UnsafeUnpin for Slot<ParentState, ParentAction, ChildState, ChildAction>
impl<ParentState, ParentAction, ChildState, ChildAction> UnwindSafe for Slot<ParentState, ParentAction, ChildState, ChildAction>
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