pub trait CompressedBytes: Sized {
// Required methods
fn to_compressed(&self) -> Vec<u8> ⓘ;
fn from_compressed(bytes: &[u8]) -> Option<Self>;
// Provided methods
fn to_uncompressed(&self) -> Vec<u8> ⓘ { ... }
fn from_uncompressed(bytes: &[u8]) -> Option<Self> { ... }
}Expand description
A trait for handling points in compressed form.
Required Methods§
Sourcefn to_compressed(&self) -> Vec<u8> ⓘ
fn to_compressed(&self) -> Vec<u8> ⓘ
Convert the point to compressed bytes.
Sourcefn from_compressed(bytes: &[u8]) -> Option<Self>
fn from_compressed(bytes: &[u8]) -> Option<Self>
Convert the point from compressed bytes.
Provided Methods§
Sourcefn to_uncompressed(&self) -> Vec<u8> ⓘ
fn to_uncompressed(&self) -> Vec<u8> ⓘ
Convert the point to uncompressed bytes.
Sourcefn from_uncompressed(bytes: &[u8]) -> Option<Self>
fn from_uncompressed(bytes: &[u8]) -> Option<Self>
Convert the point from uncompressed bytes.
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.