pub struct Json<T>(pub T);Expand description
JSON encoding and decoding
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: Serialize> Encode for Json<T>
impl<T: Serialize> Encode for Json<T>
Source§fn try_serialize(self) -> FunctionResult<impl Into<Vec<u8>>>
fn try_serialize(self) -> FunctionResult<impl Into<Vec<u8>>>
Convert the payload to a vector of bytes
Source§impl<T: DeserializeOwned> Extract for Json<T>
impl<T: DeserializeOwned> Extract for Json<T>
Source§impl<'a, T: Serialize> PublishKind<'a> for Json<T>
impl<'a, T: Serialize> PublishKind<'a> for Json<T>
Source§fn as_publish(&'a self) -> FunctionResult<Publish<'a, Self::Encoding>>
fn as_publish(&'a self) -> FunctionResult<Publish<'a, Self::Encoding>>
Convert this type into a publishable message
Auto Trait Implementations§
impl<T> Freeze for Json<T>where
T: Freeze,
impl<T> RefUnwindSafe for Json<T>where
T: RefUnwindSafe,
impl<T> Send for Json<T>where
T: Send,
impl<T> Sync for Json<T>where
T: Sync,
impl<T> Unpin for Json<T>where
T: Unpin,
impl<T> UnwindSafe for Json<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