Enum multipart::server::save::SavedData[][src]

pub enum SavedData {
    Text(String),
    Bytes(Vec<u8>),
    File(PathBufu64),
}

A saved field's data container (in memory or on disk)

Variants

Validated UTF-8 text data.

Binary data.

A path to a file on the filesystem and its size as written by multipart.

Methods

impl SavedData
[src]

Get an adapter for this data which implements Read.

If the data is in a file, the file is opened in read-only mode.

Get the size of the data, in memory or on disk.

Note

The size on disk may not match the size of the file if it is externally modified.

Returns true if the data is known to be in memory (Text | Bytes)

Trait Implementations

impl Debug for SavedData
[src]

Formats the value using the given formatter. Read more

impl From<String> for SavedData
[src]

Performs the conversion.

impl From<Vec<u8>> for SavedData
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for SavedData

impl Sync for SavedData