pub struct FnClientCallback<F, E>{ /* private fields */ }Expand description
Adapter that lifts any Fn(&CallbackRequest, &[PayloadEnvelope]) -> Result<CallbackResponse, E> into a ClientCallback.
The fake-client tests stand up a ClientCallback inline through
this type without IO.
Implementations§
Source§impl<F, E> FnClientCallback<F, E>
impl<F, E> FnClientCallback<F, E>
Trait Implementations§
Source§impl<F, E> ClientCallback for FnClientCallback<F, E>
impl<F, E> ClientCallback for FnClientCallback<F, E>
Source§type Error = E
type Error = E
Error produced by the client transport. Kept generic so an
in-process impl, a renderer-backed impl, and a network impl
can each carry their own diagnostic shape.
Source§fn dispatch(
&self,
request: &CallbackRequest,
payloads: &[PayloadEnvelope],
) -> Result<CallbackResponse, Self::Error>
fn dispatch( &self, request: &CallbackRequest, payloads: &[PayloadEnvelope], ) -> Result<CallbackResponse, Self::Error>
Auto Trait Implementations§
impl<F, E> Freeze for FnClientCallback<F, E>where
F: Freeze,
impl<F, E> RefUnwindSafe for FnClientCallback<F, E>where
F: RefUnwindSafe,
E: RefUnwindSafe,
impl<F, E> Send for FnClientCallback<F, E>
impl<F, E> Sync for FnClientCallback<F, E>
impl<F, E> Unpin for FnClientCallback<F, E>
impl<F, E> UnsafeUnpin for FnClientCallback<F, E>where
F: UnsafeUnpin,
impl<F, E> UnwindSafe for FnClientCallback<F, E>where
F: UnwindSafe,
E: 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