pub struct FnService<I, O, E, F: Fn(I) -> Result<O, E>> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<I, O, E, F: Fn(I) -> Result<O, E>> Service for FnService<I, O, E, F>
impl<I, O, E, F: Fn(I) -> Result<O, E>> Service for FnService<I, O, E, F>
type Input = I
type Output = O
type Error = E
Source§fn process(&self, input: I) -> Result<Self::Output, Self::Error>
fn process(&self, input: I) -> Result<Self::Output, Self::Error>
Process an input, producing a
Result<Self::Output, Self::Error>Source§fn into_mut(self) -> ServiceMut<Self>where
Self: Sized,
fn into_mut(self) -> ServiceMut<Self>where
Self: Sized,
Source§fn into_async(self) -> ServiceAsync<Self>
fn into_async(self) -> ServiceAsync<Self>
Source§fn into_dyn<'a>(self) -> DynService<'a, Self::Input, Self::Output, Self::Error>where
Self: Sized + 'static,
fn into_dyn<'a>(self) -> DynService<'a, Self::Input, Self::Output, Self::Error>where
Self: Sized + 'static,
Convert this
Service into a DynServiceAuto Trait Implementations§
impl<I, O, E, F> Freeze for FnService<I, O, E, F>where
F: Freeze,
impl<I, O, E, F> RefUnwindSafe for FnService<I, O, E, F>where
F: RefUnwindSafe,
impl<I, O, E, F> Send for FnService<I, O, E, F>where
F: Send,
impl<I, O, E, F> Sync for FnService<I, O, E, F>where
F: Sync,
impl<I, O, E, F> Unpin for FnService<I, O, E, F>where
F: Unpin,
impl<I, O, E, F> UnwindSafe for FnService<I, O, E, 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