Struct datacake_rpc::Request
source · Expand description
A zero-copy view of the message data and any additional metadata provided by the RPC system.
The request contains the original request buffer which is used to create the ‘view’ of the given message type.
Implementations§
source§impl<Msg> Request<Msg>where
Msg: Archive,
Msg::Archived: CheckBytes<DefaultValidator<'static>> + 'static,
impl<Msg> Request<Msg>where
Msg: Archive,
Msg::Archived: CheckBytes<DefaultValidator<'static>> + 'static,
sourcepub fn into_view(self) -> DataView<Msg>
pub fn into_view(self) -> DataView<Msg>
Consumes the request into the data view of the message.
sourcepub fn remote_addr(&self) -> SocketAddr
pub fn remote_addr(&self) -> SocketAddr
The remote address of the incoming message.
source§impl<Msg> Request<Msg>where
Msg: Archive,
Msg::Archived: Deserialize<Msg, SharedDeserializeMap> + 'static,
impl<Msg> Request<Msg>where
Msg: Archive,
Msg::Archived: Deserialize<Msg, SharedDeserializeMap> + 'static,
sourcepub fn to_owned(&self) -> Result<Msg, InvalidView>
pub fn to_owned(&self) -> Result<Msg, InvalidView>
Deserializes the view into it’s owned value T.
Trait Implementations§
Auto Trait Implementations§
impl<Msg> RefUnwindSafe for Request<Msg>where
<Msg as Archive>::Archived: RefUnwindSafe,
impl<Msg> Send for Request<Msg>where
<Msg as Archive>::Archived: Sync,
impl<Msg> Sync for Request<Msg>where
<Msg as Archive>::Archived: Sync,
impl<Msg> Unpin for Request<Msg>
impl<Msg> UnwindSafe for Request<Msg>where
<Msg as Archive>::Archived: RefUnwindSafe,
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
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> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: *const T) -> Layout
fn layout_raw(_: *const T) -> Layout
Gets the layout of the type.