pub trait SerializerExt<T>where
Self: SpecByteLen<T = T::V> + SpecSerializer<SVal = T::V> + Consistency<Val = T::V>,
T: DeepView + ?Sized,{
// Provided methods
exec fn serialize<'a>(&self, v: &T, obuf: &'a mut [u8])
where Self: Serializer<OutputSlice<'a>, T> { ... }
fn serialize_with_vec(&self, v: &T, obuf: &mut Vec<u8>)
where Self: Serializer<Vec<u8>, T> { ... }
}Expand description
Convenience entry points for the two standard output destinations.
Provided Methods§
Sourceexec fn serialize<'a>(&self, v: &T, obuf: &'a mut [u8])where
Self: Serializer<OutputSlice<'a>, T>,
exec fn serialize<'a>(&self, v: &T, obuf: &'a mut [u8])where
Self: Serializer<OutputSlice<'a>, T>,
requires
self.exec_inv(),self.consistent(v.deep_view()),obuf@.len() == self.byte_len(v.deep_view()),ensuresfinal(obuf)@ == self.spec_serialize(v.deep_view()),Serializes into an exactly-sized caller-provided slice without allocating.
Sourceexec fn serialize_with_vec(&self, v: &T, obuf: &mut Vec<u8>)
exec fn serialize_with_vec(&self, v: &T, obuf: &mut Vec<u8>)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.