Snapshot

Trait Snapshot 

Source
pub trait Snapshot {
    type Borrowed: ?Sized;
    type Owned: Borrow<Self::Borrowed> + TestInput;

    // Required methods
    fn borrow(&self) -> &Self::Borrowed;
    fn to_bytes(&self) -> Vec<u8> ;
}

Required Associated Types§

Required Methods§

Source

fn borrow(&self) -> &Self::Borrowed

Source

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

Implementations on Foreign Types§

Source§

impl Snapshot for str

Source§

impl Snapshot for String

Source§

impl Snapshot for Vec<u8>

Source§

type Borrowed = Vec<u8>

Source§

type Owned = Vec<u8>

Source§

fn borrow(&self) -> &Self::Borrowed

Source§

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

Source§

impl Snapshot for [u8]

Source§

type Borrowed = [u8]

Source§

type Owned = Vec<u8>

Source§

fn borrow(&self) -> &Self::Borrowed

Source§

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

Source§

impl<'a, T> Snapshot for &'a T
where T: Snapshot + ?Sized,

Source§

type Borrowed = <T as Snapshot>::Borrowed

Source§

type Owned = <T as Snapshot>::Owned

Source§

fn borrow(&self) -> &Self::Borrowed

Source§

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

Source§

impl<'a, T> Snapshot for &'a mut T
where T: Snapshot + ?Sized,

Source§

type Borrowed = <T as Snapshot>::Borrowed

Source§

type Owned = <T as Snapshot>::Owned

Source§

fn borrow(&self) -> &Self::Borrowed

Source§

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

Implementors§