pub struct WithContext<Context, H> { /* private fields */ }
Implementations§
Source§impl<Context, H> WithContext<Context, H>
impl<Context, H> WithContext<Context, H>
Trait Implementations§
Source§impl<Context, Inherited, H> Handler<Inherited> for WithContext<Context, H>where
Context: Context,
H: HandlerFor<Context> + CliBindings<Context>,
H::Ok: Serialize + DeserializeOwned,
H::Params: DeserializeOwned,
H::InheritedParams: OrEmpty<Inherited>,
RpcError: From<H::Err>,
Inherited: Send + Sync + 'static,
impl<Context, Inherited, H> Handler<Inherited> for WithContext<Context, H>where
Context: Context,
H: HandlerFor<Context> + CliBindings<Context>,
H::Ok: Serialize + DeserializeOwned,
H::Params: DeserializeOwned,
H::InheritedParams: OrEmpty<Inherited>,
RpcError: From<H::Err>,
Inherited: Send + Sync + 'static,
type H = H
fn handler_for<C: Context>(self) -> Option<DynHandler<C, Inherited>>
Source§impl<Context, H, Inherited, RemoteContext> Handler<Inherited> for WithContext<Context, RemoteCaller<Context, RemoteContext, H>>where
Context: Context + CallRemote<RemoteContext>,
RemoteContext: Context,
H: HandlerFor<RemoteContext> + CliBindings<Context>,
H::Ok: Serialize + DeserializeOwned,
H::Err: From<RpcError>,
H::Params: Serialize + DeserializeOwned,
H::InheritedParams: OrEmpty<Inherited>,
RpcError: From<H::Err>,
Inherited: Send + Sync + 'static,
impl<Context, H, Inherited, RemoteContext> Handler<Inherited> for WithContext<Context, RemoteCaller<Context, RemoteContext, H>>where
Context: Context + CallRemote<RemoteContext>,
RemoteContext: Context,
H: HandlerFor<RemoteContext> + CliBindings<Context>,
H::Ok: Serialize + DeserializeOwned,
H::Err: From<RpcError>,
H::Params: Serialize + DeserializeOwned,
H::InheritedParams: OrEmpty<Inherited>,
RpcError: From<H::Err>,
Inherited: Send + Sync + 'static,
type H = H
fn handler_for<C: Context>(self) -> Option<DynHandler<C, Inherited>>
Auto Trait Implementations§
impl<Context, H> Freeze for WithContext<Context, H>where
H: Freeze,
impl<Context, H> RefUnwindSafe for WithContext<Context, H>where
H: RefUnwindSafe,
Context: RefUnwindSafe,
impl<Context, H> Send for WithContext<Context, H>
impl<Context, H> Sync for WithContext<Context, H>
impl<Context, H> Unpin for WithContext<Context, H>
impl<Context, H> UnwindSafe for WithContext<Context, H>where
H: UnwindSafe,
Context: 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