pub enum SavedData {
Text(String),
Bytes(Vec<u8>),
File(PathBuf, u64),
}
Expand description
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
.
Implementations§
Source§impl SavedData
impl SavedData
Sourcepub fn readable(&self) -> Result<DataReader<'_>>
pub fn readable(&self) -> Result<DataReader<'_>>
Get an adapter for this data which implements Read
.
If the data is in a file, the file is opened in read-only mode.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SavedData
impl RefUnwindSafe for SavedData
impl Send for SavedData
impl Sync for SavedData
impl Unpin for SavedData
impl UnwindSafe for SavedData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more