[][src]Struct bindle::testing::RawScaffold

pub struct RawScaffold {
    pub invoice: Vec<u8>,
    pub label_files: HashMap<String, Vec<u8>>,
    pub parcel_files: HashMap<String, Vec<u8>>,
}

A scaffold loaded from disk, containing the raw bytes for all files in the bindle. Both label_files and parcel_files are the names of the files on disk with the extension removed. This allows for easy lookups in both maps as they should have the same name

Fields

invoice: Vec<u8>label_files: HashMap<String, Vec<u8>>parcel_files: HashMap<String, Vec<u8>>

Implementations

impl RawScaffold[src]

pub async fn load<'_>(name: &'_ str) -> RawScaffold[src]

Loads the raw scaffold files. Will panic if the scaffold doesn't exist. Returns a RawScaffold containing all the raw files.

pub fn parcel_body(&self, parcel_name: &str) -> RequestBuilder[src]

Prepares a raw multipart body for the given parcel name for sending in a request and returns a warp test RequestBuilder with the body and Content-Type header set

Trait Implementations

impl Clone for RawScaffold[src]

impl Debug for RawScaffold[src]

impl From<RawScaffold> for Scaffold[src]

impl From<Scaffold> for RawScaffold[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,