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]

[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.

[src]

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.

[src]

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

Trait Implementations

impl Debug for SavedData
[src]

[src]

Formats the value using the given formatter.

impl From<String> for SavedData
[src]

[src]

Performs the conversion.

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

[src]

Performs the conversion.