pub struct Serializer { /* private fields */ }Expand description
A wrapper struct for serialization operations.
Implementations§
Source§impl Serializer
impl Serializer
Sourcepub fn new(serializer_type: SerializerType) -> Self
pub fn new(serializer_type: SerializerType) -> Self
Creates a new serializer with the specified type.
Sourcepub fn deserialize<T: DeserializeOwned>(
&self,
bytes: &[u8],
) -> Result<T, ServerlessError>
pub fn deserialize<T: DeserializeOwned>( &self, bytes: &[u8], ) -> Result<T, ServerlessError>
Trait Implementations§
Source§impl Clone for Serializer
impl Clone for Serializer
Source§fn clone(&self) -> Serializer
fn clone(&self) -> Serializer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Serializer
impl RefUnwindSafe for Serializer
impl Send for Serializer
impl Sync for Serializer
impl Unpin for Serializer
impl UnsafeUnpin for Serializer
impl UnwindSafe for Serializer
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