Skip to main content

SpanBytes

Trait SpanBytes 

Source
pub trait SpanBytes:
    Debug
    + Eq
    + Hash
    + Borrow<[u8]>
    + Serialize
    + Default {
    // Required method
    fn from_static_bytes(value: &'static [u8]) -> Self;
}

Required Methods§

Source

fn from_static_bytes(value: &'static [u8]) -> Self

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.

Implementations on Foreign Types§

Source§

impl SpanBytes for &[u8]

Source§

fn from_static_bytes(value: &'static [u8]) -> Self

Source§

impl SpanBytes for Bytes

Source§

fn from_static_bytes(value: &'static [u8]) -> Self

Implementors§