Trait OreOutput

Source
pub trait OreOutput: Sized {
    // Required methods
    fn size() -> usize;
    fn to_bytes(&self) -> Vec<u8> ;
    fn from_slice(data: &[u8]) -> Result<Self, ParseError>;

    // Provided method
    fn from_bytes(data: &[u8]) -> Result<Self, ParseError> { ... }
}
Expand description

The trait of any encryption output (either Left, Right or combined).

Required Methods§

Source

fn size() -> usize

The size (in bytes) of this encrypted value

Source

fn to_bytes(&self) -> Vec<u8>

Convert to bytes

Source

fn from_slice(data: &[u8]) -> Result<Self, ParseError>

Try to deserialize from a slice

Provided Methods§

Source

fn from_bytes(data: &[u8]) -> Result<Self, ParseError>

👎Deprecated since 0.8.0: please use from_slice instead

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§

Source§

impl<S: OreCipher, const N: usize> OreOutput for CipherText<S, N>

Source§

impl<S: OreCipher, const N: usize> OreOutput for Left<S, N>

Source§

impl<S: OreCipher, const N: usize> OreOutput for Right<S, N>