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§
Sourcefn from_slice(data: &[u8]) -> Result<Self, ParseError>
fn from_slice(data: &[u8]) -> Result<Self, ParseError>
Try to deserialize from a slice
Provided Methods§
fn from_bytes(data: &[u8]) -> Result<Self, ParseError>
👎Deprecated since 0.8.0: please use
from_slice
insteadDyn 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.