pub struct HttpRequestDeserializer<'a> { /* private fields */ }
Expand description
Wrapper for HttpRequest
that implements MessageDeserializer
trait.
Implementations§
Source§impl HttpRequestDeserializer<'_>
impl HttpRequestDeserializer<'_>
pub fn new(req: &HttpRequest, body: Bytes) -> HttpRequestDeserializer<'_>
Trait Implementations§
Source§impl<'a> BinaryDeserializer for HttpRequestDeserializer<'a>
impl<'a> BinaryDeserializer for HttpRequestDeserializer<'a>
Source§fn deserialize_binary<R: Sized, V: BinarySerializer<R>>(
self,
visitor: V,
) -> Result<R>
fn deserialize_binary<R: Sized, V: BinarySerializer<R>>( self, visitor: V, ) -> Result<R>
Deserialize the message to
BinarySerializer
.Source§impl<'a> MessageDeserializer for HttpRequestDeserializer<'a>
impl<'a> MessageDeserializer for HttpRequestDeserializer<'a>
Source§fn deserialize_to_binary<R, T>(self, serializer: T) -> Result<R, Error>where
T: BinarySerializer<R>,
fn deserialize_to_binary<R, T>(self, serializer: T) -> Result<R, Error>where
T: BinarySerializer<R>,
Deserialize the message to
BinarySerializer
.Source§fn deserialize_to_structured<R, T>(self, serializer: T) -> Result<R, Error>where
T: StructuredSerializer<R>,
fn deserialize_to_structured<R, T>(self, serializer: T) -> Result<R, Error>where
T: StructuredSerializer<R>,
Deserialize the message to
StructuredSerializer
.Source§fn deserialize_to<R, T>(self, serializer: T) -> Result<R, Error>where
T: BinarySerializer<R> + StructuredSerializer<R>,
fn deserialize_to<R, T>(self, serializer: T) -> Result<R, Error>where
T: BinarySerializer<R> + StructuredSerializer<R>,
Deserialize the message to a serializer, depending on the message encoding.
You can use this method to transcode this message directly to another serializer, without going through
Event
.Source§impl<'a> StructuredDeserializer for HttpRequestDeserializer<'a>
impl<'a> StructuredDeserializer for HttpRequestDeserializer<'a>
Source§fn deserialize_structured<R: Sized, V: StructuredSerializer<R>>(
self,
visitor: V,
) -> Result<R>
fn deserialize_structured<R: Sized, V: StructuredSerializer<R>>( self, visitor: V, ) -> Result<R>
Deserialize the message to
StructuredSerializer
.Auto Trait Implementations§
impl<'a> !Freeze for HttpRequestDeserializer<'a>
impl<'a> !RefUnwindSafe for HttpRequestDeserializer<'a>
impl<'a> !Send for HttpRequestDeserializer<'a>
impl<'a> !Sync for HttpRequestDeserializer<'a>
impl<'a> Unpin for HttpRequestDeserializer<'a>
impl<'a> !UnwindSafe for HttpRequestDeserializer<'a>
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> 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 more