pub struct FnRouter<S, F>{ /* private fields */ }Expand description
A router created from a sync function.
Implementations§
Trait Implementations§
Source§impl<S, F> EdgeRouter<S> for FnRouter<S, F>
impl<S, F> EdgeRouter<S> for FnRouter<S, F>
Source§fn route<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<RouteOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn route<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<RouteOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Determine the next node(s) based on the current state.
Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
Get a description of this router (for debugging).
Auto Trait Implementations§
impl<S, F> Freeze for FnRouter<S, F>
impl<S, F> RefUnwindSafe for FnRouter<S, F>
impl<S, F> Send for FnRouter<S, F>where
PhantomData<S>: Send,
impl<S, F> Sync for FnRouter<S, F>where
PhantomData<S>: Sync,
impl<S, F> Unpin for FnRouter<S, F>
impl<S, F> UnsafeUnpin for FnRouter<S, F>
impl<S, F> UnwindSafe for FnRouter<S, F>
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