Trait bitcode_lightyear_patch::Decode
source · pub trait Decode: Sized { }Expand description
A type which can be decoded from bytes with decode.
Must use #[derive(Decode)] to implement.
#[derive(bitcode::Decode)]
// If your struct contains itself you must annotate it with `#[bitcode(recursive)]`.
// This disables certain speed optimizations that aren't possible on recursive types.
struct MyStruct {
a: u32,
b: bool,
// If you want to use serde::Deserialize on a field instead of bitcode::Decode.
#[cfg(feature = "serde")]
#[bitcode(with_serde)]
c: String,
}Object Safety§
This trait is not object safe.