pub trait FromBytesOwned: Sized {
    // Required method
    fn from_bytes_owned(data: &[u8]) -> Result<Self, Error>;
}
Expand description

FromBytesOwned is similar to FromBytes but it doesn’t borrow from the input slice. FromBytes is automatically implemented for all types that implement FromBytesOwned.

FromBytesOwned can be derived through #[derive(FromBytes)].

Required Methods§

source

fn from_bytes_owned(data: &[u8]) -> Result<Self, Error>

Decode a value from a slice of bytes, the resulting value should not borrow the input data.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromBytesOwned for Value

source§

impl FromBytesOwned for f32

source§

impl FromBytesOwned for f64

source§

impl FromBytesOwned for i32

source§

impl FromBytesOwned for i64

source§

impl FromBytesOwned for u32

source§

impl FromBytesOwned for u64

source§

impl FromBytesOwned for ()

source§

impl FromBytesOwned for Box<[u8]>

source§

impl FromBytesOwned for String

source§

impl FromBytesOwned for Vec<u8>

Implementors§