pub struct Decoded<T>(/* private fields */);Expand description
The typed input kind: the payload decodes into an owned T, the handler borrows &T.
Trait Implementations§
Source§impl<DecodeCodec: Codec, T: DeserializeOwned + Send + Sync + 'static> DecodeWith<DecodeCodec> for Decoded<T>
impl<DecodeCodec: Codec, T: DeserializeOwned + Send + Sync + 'static> DecodeWith<DecodeCodec> for Decoded<T>
Source§fn decode(codec: &DecodeCodec, payload: &[u8]) -> Result<T, CodecError>
fn decode(codec: &DecodeCodec, payload: &[u8]) -> Result<T, CodecError>
Decodes one delivery’s payload. Read more
Source§impl<T: Send + Sync + 'static> InputKind for Decoded<T>
impl<T: Send + Sync + 'static> InputKind for Decoded<T>
Source§type Target = T
type Target = T
What the handler borrows:
&T for a decoded input, [u8] behind the reference for a
raw one.Source§fn view<'a>(owned: &'a T, _payload: &'a [u8]) -> &'a T
fn view<'a>(owned: &'a T, _payload: &'a [u8]) -> &'a T
Lends the handler its view of the decode product and the delivery payload.
Source§fn input_label() -> &'static str
fn input_label() -> &'static str
The label
AsyncAPI metadata uses for this input.Auto Trait Implementations§
impl<T> Freeze for Decoded<T>
impl<T> RefUnwindSafe for Decoded<T>where
T: RefUnwindSafe,
impl<T> Send for Decoded<T>where
T: Send,
impl<T> Sync for Decoded<T>where
T: Sync,
impl<T> Unpin for Decoded<T>where
T: Unpin,
impl<T> UnsafeUnpin for Decoded<T>
impl<T> UnwindSafe for Decoded<T>where
T: 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