Trait StrictSerialize

Source
pub trait StrictSerialize: StrictEncode {
    // Provided methods
    fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize> { ... }
    fn to_strict_serialized<const MAX: usize>(
        &self,
    ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError> { ... }
    fn strict_serialize_to_file<const MAX: usize>(
        &self,
        path: impl AsRef<Path>,
    ) -> Result<(), SerializeError> { ... }
}

Provided Methods§

Source

fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize>

Source

fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>

Source

fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>

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.

Implementors§