Skip to main content

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>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Snapshot for String

Source§

impl Snapshot for Vec<u8>

Source§

impl Snapshot for [u8]

Source§

impl Snapshot for str

Source§

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

Source§

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

Implementors§