Enum multipart::server::save::SavedData
[−]
[src]
pub enum SavedData { Text(String), Bytes(Vec<u8>), File(PathBuf, u64), }
A saved field's data container (in memory or on disk)
Variants
Text(String)
Validated UTF-8 text data.
Bytes(Vec<u8>)
Binary data.
File(PathBuf, u64)
A path to a file on the filesystem and its size as written by multipart
.
Methods
impl SavedData
[src]
fn readable(&self) -> Result<DataReader>
[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.
fn size(&self) -> u64
[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.
fn is_memory(&self) -> bool
[src]
Returns true
if the data is known to be in memory (Text | Bytes
)