pub struct ServerContext(/* private fields */);Available on crate feature
server only.Expand description
RPC context of http server
Implementations§
Source§impl ServerContext
impl ServerContext
Sourcepub fn new(peer: Address) -> Self
pub fn new(peer: Address) -> Self
Create a new ServerContext with the address of client
Trait Implementations§
Source§impl Context for ServerContext
impl Context for ServerContext
type Config = Config
fn rpc_info(&self) -> &RpcInfo<Self::Config>
fn rpc_info_mut(&mut self) -> &mut RpcInfo<Self::Config>
fn extensions_mut(&mut self) -> &mut Extensions
fn extensions(&self) -> &Extensions
Source§impl Debug for ServerContext
impl Debug for ServerContext
Source§impl Deref for ServerContext
impl Deref for ServerContext
Source§impl DerefMut for ServerContext
impl DerefMut for ServerContext
Source§impl<S, F, T, Req, R1, R2> Service<ServerContext, Req> for MapResponse<S, F, T, R1, R2>
impl<S, F, T, Req, R1, R2> Service<ServerContext, Req> for MapResponse<S, F, T, R1, R2>
Source§impl<S, B> Service<ServerContext, Request<B>> for ClientIpService<S>
impl<S, B> Service<ServerContext, Request<B>> for ClientIpService<S>
Source§impl<S, F, T, B, B2, E2> Service<ServerContext, Request<B>> for FromFn<S, F, T, B, B2, E2>
impl<S, F, T, B, B2, E2> Service<ServerContext, Request<B>> for FromFn<S, F, T, B, B2, E2>
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§impl<B, E> Service<ServerContext, Request<B>> for MethodRouter<B, E>where
B: Send,
impl<B, E> Service<ServerContext, Request<B>> for MethodRouter<B, E>where
B: Send,
Source§impl<B, E> Service<ServerContext, Request<B>> for Router<B, E>where
B: Send + 'static,
E: 'static,
impl<B, E> Service<ServerContext, Request<B>> for Router<B, E>where
B: Send + 'static,
E: 'static,
Auto Trait Implementations§
impl !Freeze for ServerContext
impl !RefUnwindSafe for ServerContext
impl Send for ServerContext
impl Sync for ServerContext
impl Unpin for ServerContext
impl !UnwindSafe for ServerContext
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