pub struct DataParser {
pub serialization_type: SerializationType,
}
Fields§
§serialization_type: SerializationType
Implementations§
Source§impl DataParser
impl DataParser
pub fn encode_json<T: DataEncoder>( &self, data: &T, ) -> Result<Vec<u8>, DataParserError>
pub fn to_json_value<T: Serialize>( &self, data: &T, ) -> Result<Value, DataParserError>
pub fn decode_json<T: DataEncoder>( &self, data: &[u8], ) -> Result<T, DataParserError>
Trait Implementations§
Source§impl Clone for DataParser
impl Clone for DataParser
Source§fn clone(&self) -> DataParser
fn clone(&self) -> DataParser
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 DataParser
impl RefUnwindSafe for DataParser
impl Send for DataParser
impl Sync for DataParser
impl Unpin for DataParser
impl UnwindSafe for DataParser
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