pub struct SerializationRegistry { /* private fields */ }Implementations§
Source§impl SerializationRegistry
impl SerializationRegistry
pub fn new() -> Self
pub fn register<T>(&self, serializer: JsonSerializer<T>)
pub fn to_bytes<T>(&self, value: &T) -> Result<Vec<u8>, SerializerError>
pub fn from_bytes<T>(&self, bytes: &[u8]) -> Result<T, SerializerError>
Trait Implementations§
Source§impl Default for SerializationRegistry
impl Default for SerializationRegistry
Source§fn default() -> SerializationRegistry
fn default() -> SerializationRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SerializationRegistry
impl !RefUnwindSafe for SerializationRegistry
impl Send for SerializationRegistry
impl Sync for SerializationRegistry
impl Unpin for SerializationRegistry
impl UnsafeUnpin for SerializationRegistry
impl !UnwindSafe for SerializationRegistry
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