pub struct ComponentHost<S, A, Id, Ctx> { /* private fields */ }Implementations§
Source§impl<S, A, Id, Ctx> ComponentHost<S, A, Id, Ctx>where
S: 'static,
A: 'static,
Id: ComponentId + 'static,
Ctx: BindingContext + 'static,
impl<S, A, Id, Ctx> ComponentHost<S, A, Id, Ctx>where
S: 'static,
A: 'static,
Id: ComponentId + 'static,
Ctx: BindingContext + 'static,
pub fn new() -> Self
pub fn mount<C, P>(
&self,
factory: impl Fn() -> C + 'static,
props: P,
) -> Mounted<C>where
C: InteractiveComponent<A, Ctx> + 'static,
P: PropsFactory<S, C, A, Ctx> + 'static,
pub fn unmount<C>(
&self,
mounted: Mounted<C>,
) -> Result<(), HostLifecycleError<Id>>where
C: InteractiveComponent<A, Ctx> + 'static,
pub fn update<C>(
&self,
mounted: Mounted<C>,
input: ComponentInput<'_, Ctx>,
state: &S,
) -> HandlerResponse<A>where
C: InteractiveComponent<A, Ctx> + 'static,
pub fn render<C>(
&self,
mounted: Mounted<C>,
frame: &mut Frame<'_>,
area: Rect,
state: &S,
)where
C: InteractiveComponent<A, Ctx> + 'static,
pub fn reset_local_state(&self)
pub fn mounted_components(&self) -> Vec<MountedComponentInfo<Id>>
Source§impl<S, A, Id, Ctx> ComponentHost<S, A, Id, Ctx>where
S: 'static,
A: 'static + ActionTrait,
Id: ComponentId + 'static,
Ctx: BindingContext + 'static,
impl<S, A, Id, Ctx> ComponentHost<S, A, Id, Ctx>where
S: 'static,
A: 'static + ActionTrait,
Id: ComponentId + 'static,
Ctx: BindingContext + 'static,
Trait Implementations§
Source§impl<S, A, Id, Ctx> Clone for ComponentHost<S, A, Id, Ctx>
impl<S, A, Id, Ctx> Clone for ComponentHost<S, A, Id, Ctx>
Source§impl<S, A, Id, Ctx> Default for ComponentHost<S, A, Id, Ctx>where
S: 'static,
A: 'static,
Id: ComponentId + 'static,
Ctx: BindingContext + 'static,
impl<S, A, Id, Ctx> Default for ComponentHost<S, A, Id, Ctx>where
S: 'static,
A: 'static,
Id: ComponentId + 'static,
Ctx: BindingContext + 'static,
Auto Trait Implementations§
impl<S, A, Id, Ctx> Freeze for ComponentHost<S, A, Id, Ctx>
impl<S, A, Id, Ctx> !RefUnwindSafe for ComponentHost<S, A, Id, Ctx>
impl<S, A, Id, Ctx> !Send for ComponentHost<S, A, Id, Ctx>
impl<S, A, Id, Ctx> !Sync for ComponentHost<S, A, Id, Ctx>
impl<S, A, Id, Ctx> Unpin for ComponentHost<S, A, Id, Ctx>
impl<S, A, Id, Ctx> UnsafeUnpin for ComponentHost<S, A, Id, Ctx>
impl<S, A, Id, Ctx> !UnwindSafe for ComponentHost<S, A, Id, Ctx>
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more