pub struct Bincode;Expand description
Used to specify that the bincode 1.3 crate is to be used for serialization & deserialization.
§Warning
bincode does not implement
all serde features. Errors may be
encountered when using this with some types.
If you are encountering errors when using this codec on your types, try
using the rmp_serde_1_3 codec instead.
§Basic usage
Use the with attribute on your type to instruct
native_model to use Bincode for serialization & deserialization.
Example usage:
#[derive(Clone, Default, serde::Deserialize, serde::Serialize)]
#[native_model(id = 1, version = 1, with = native_model::bincode_1_3::Bincode)]
struct MyStruct {
my_string: String
}Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bincode
impl RefUnwindSafe for Bincode
impl Send for Bincode
impl Sync for Bincode
impl Unpin for Bincode
impl UnwindSafe for Bincode
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