pub trait ValueDecode: 'static + Sized {
const DECODE: &'static ValueDecodeSpec;
}Expand description
Describes the encoded representation, independently of reflection and memory layout. A handwritten encoder can delegate to the type it actually writes:
use cu_bincode::{ValueDecode, ValueDecodeSpec};
struct Orientation([f32; 4]);
impl ValueDecode for Orientation {
const DECODE: &'static ValueDecodeSpec = <[f32; 4] as ValueDecode>::DECODE;
}Required Associated Constants§
Sourceconst DECODE: &'static ValueDecodeSpec
const DECODE: &'static ValueDecodeSpec
Complete wire recipe for this encoding.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ValueDecode for &'static str
impl ValueDecode for &'static str
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for ()
impl ValueDecode for ()
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for String
Available on crate feature alloc only.
impl ValueDecode for String
Available on crate feature
alloc only.const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for bool
impl ValueDecode for bool
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for char
impl ValueDecode for char
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for f32
impl ValueDecode for f32
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for f64
impl ValueDecode for f64
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for i8
impl ValueDecode for i8
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for i16
impl ValueDecode for i16
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for i32
impl ValueDecode for i32
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for i64
impl ValueDecode for i64
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for i128
impl ValueDecode for i128
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for isize
impl ValueDecode for isize
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for u8
impl ValueDecode for u8
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for u16
impl ValueDecode for u16
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for u32
impl ValueDecode for u32
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for u64
impl ValueDecode for u64
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for u128
impl ValueDecode for u128
const DECODE: &'static ValueDecodeSpec
Source§impl ValueDecode for usize
impl ValueDecode for usize
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode, I: ValueDecode, J: ValueDecode, K: ValueDecode, L: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H, I, J, K, L)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode, I: ValueDecode, J: ValueDecode, K: ValueDecode, L: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H, I, J, K, L)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode, I: ValueDecode, J: ValueDecode, K: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H, I, J, K)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode, I: ValueDecode, J: ValueDecode, K: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H, I, J, K)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode, I: ValueDecode, J: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H, I, J)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode, I: ValueDecode, J: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H, I, J)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode, I: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H, I)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode, I: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H, I)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode, H: ValueDecode> ValueDecode for (A, B, C, D, E, F, G, H)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode> ValueDecode for (A, B, C, D, E, F, G)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode, G: ValueDecode> ValueDecode for (A, B, C, D, E, F, G)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode> ValueDecode for (A, B, C, D, E, F)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode, F: ValueDecode> ValueDecode for (A, B, C, D, E, F)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode> ValueDecode for (A, B, C, D, E)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode, E: ValueDecode> ValueDecode for (A, B, C, D, E)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode> ValueDecode for (A, B, C, D)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode, D: ValueDecode> ValueDecode for (A, B, C, D)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode, C: ValueDecode> ValueDecode for (A, B, C)
impl<A: ValueDecode, B: ValueDecode, C: ValueDecode> ValueDecode for (A, B, C)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode, B: ValueDecode> ValueDecode for (A, B)
impl<A: ValueDecode, B: ValueDecode> ValueDecode for (A, B)
const DECODE: &'static ValueDecodeSpec
Source§impl<A: ValueDecode> ValueDecode for (A,)
impl<A: ValueDecode> ValueDecode for (A,)
const DECODE: &'static ValueDecodeSpec
Source§impl<K: ValueDecode, V: ValueDecode, S: 'static> ValueDecode for HashMap<K, V, S>
Available on crate feature std only.
impl<K: ValueDecode, V: ValueDecode, S: 'static> ValueDecode for HashMap<K, V, S>
Available on crate feature
std only.const DECODE: &'static ValueDecodeSpec
Source§impl<K: ValueDecode, V: ValueDecode> ValueDecode for BTreeMap<K, V>
Available on crate feature alloc only.
impl<K: ValueDecode, V: ValueDecode> ValueDecode for BTreeMap<K, V>
Available on crate feature
alloc only.const DECODE: &'static ValueDecodeSpec
Source§impl<T: 'static> ValueDecode for PhantomData<T>
impl<T: 'static> ValueDecode for PhantomData<T>
const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode, S: 'static> ValueDecode for HashSet<T, S>
Available on crate feature std only.
impl<T: ValueDecode, S: 'static> ValueDecode for HashSet<T, S>
Available on crate feature
std only.const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode, const N: usize> ValueDecode for [T; N]
impl<T: ValueDecode, const N: usize> ValueDecode for [T; N]
const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for &'static T
impl<T: ValueDecode> ValueDecode for &'static T
const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for &'static [T]
impl<T: ValueDecode> ValueDecode for &'static [T]
const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for Arc<T>
Available on crate feature alloc only.
impl<T: ValueDecode> ValueDecode for Arc<T>
Available on crate feature
alloc only.const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for BTreeSet<T>
Available on crate feature alloc only.
impl<T: ValueDecode> ValueDecode for BTreeSet<T>
Available on crate feature
alloc only.const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for Box<T>
Available on crate feature alloc only.
impl<T: ValueDecode> ValueDecode for Box<T>
Available on crate feature
alloc only.const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for Option<T>
impl<T: ValueDecode> ValueDecode for Option<T>
const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for Rc<T>
Available on crate feature alloc only.
impl<T: ValueDecode> ValueDecode for Rc<T>
Available on crate feature
alloc only.const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for Vec<T>
Available on crate feature alloc only.
impl<T: ValueDecode> ValueDecode for Vec<T>
Available on crate feature
alloc only.const DECODE: &'static ValueDecodeSpec
Source§impl<T: ValueDecode> ValueDecode for VecDeque<T>
Available on crate feature alloc only.
impl<T: ValueDecode> ValueDecode for VecDeque<T>
Available on crate feature
alloc only.