pub struct ServiceRequest {
pub metadata: Arc<InboundRequestMeta>,
pub body: Bytes,
}Fields§
§metadata: Arc<InboundRequestMeta>§body: BytesImplementations§
Trait Implementations§
Source§impl AsRef<[u8]> for ServiceRequest
impl AsRef<[u8]> for ServiceRequest
Source§impl Service<ServiceRequest> for DhtService
impl Service<ServiceRequest> for DhtService
type QueryResponse = Response
type OnQueryFuture = Ready<Option<<DhtService as Service<ServiceRequest>>::QueryResponse>>
type OnMessageFuture = Ready<()>
Source§fn on_query(&self, req: ServiceRequest) -> Self::OnQueryFuture
fn on_query(&self, req: ServiceRequest) -> Self::OnQueryFuture
Called when a query is received. Read more
Source§fn on_message(&self, req: ServiceRequest) -> Self::OnMessageFuture
fn on_message(&self, req: ServiceRequest) -> Self::OnMessageFuture
Called when a message is received.
Source§impl Service<ServiceRequest> for OverlayService
impl Service<ServiceRequest> for OverlayService
type QueryResponse = Response
type OnQueryFuture = BoxFutureOrNoop<Option<<OverlayService as Service<ServiceRequest>>::QueryResponse>>
type OnMessageFuture = BoxFutureOrNoop<()>
Source§fn on_query(&self, req: ServiceRequest) -> Self::OnQueryFuture
fn on_query(&self, req: ServiceRequest) -> Self::OnQueryFuture
Called when a query is received. Read more
Source§fn on_message(&self, req: ServiceRequest) -> Self::OnMessageFuture
fn on_message(&self, req: ServiceRequest) -> Self::OnMessageFuture
Called when a message is received.
Auto Trait Implementations§
impl !Freeze for ServiceRequest
impl RefUnwindSafe for ServiceRequest
impl Send for ServiceRequest
impl Sync for ServiceRequest
impl Unpin for ServiceRequest
impl UnwindSafe for ServiceRequest
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)