pub struct ChannelHandler<T: Send + 'static> { /* private fields */ }Expand description
Channel-based event handler — maps AgentTaskEvent to your AppEvent type.
Implementations§
Trait Implementations§
Source§impl<T: Send + 'static> AgentEventHandler for ChannelHandler<T>
impl<T: Send + 'static> AgentEventHandler for ChannelHandler<T>
Source§fn on_event(&self, event: AgentTaskEvent) -> bool
fn on_event(&self, event: AgentTaskEvent) -> bool
Called for each agent task event. Return false to stop the loop.
Auto Trait Implementations§
impl<T> Freeze for ChannelHandler<T>
impl<T> !RefUnwindSafe for ChannelHandler<T>
impl<T> Send for ChannelHandler<T>
impl<T> Sync for ChannelHandler<T>
impl<T> Unpin for ChannelHandler<T>
impl<T> UnsafeUnpin for ChannelHandler<T>
impl<T> !UnwindSafe for ChannelHandler<T>
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> 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