pub struct FnBehavior<F> { /* private fields */ }Implementations§
Source§impl<F> FnBehavior<F>
impl<F> FnBehavior<F>
pub fn new(id: BehaviorId, pattern: EventPattern, f: F) -> Self
Trait Implementations§
Source§impl<F, Fut> Behavior for FnBehavior<F>
impl<F, Fut> Behavior for FnBehavior<F>
fn id(&self) -> BehaviorId
fn pattern(&self) -> EventPattern
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: BehaviorContext,
event: &'life1 Event,
) -> Pin<Box<dyn Future<Output = Result<Vec<StateOp>, StateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<F> Freeze for FnBehavior<F>where
F: Freeze,
impl<F> RefUnwindSafe for FnBehavior<F>where
F: RefUnwindSafe,
impl<F> Send for FnBehavior<F>where
F: Send,
impl<F> Sync for FnBehavior<F>where
F: Sync,
impl<F> Unpin for FnBehavior<F>where
F: Unpin,
impl<F> UnsafeUnpin for FnBehavior<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FnBehavior<F>where
F: UnwindSafe,
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