[−][src]Enum multipart::server::save::SavedData
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]
impl SavedData
pub fn readable(&self) -> Result<DataReader>
[src]
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.
pub fn size(&self) -> u64
[src]
pub fn size(&self) -> u64
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.
pub fn is_memory(&self) -> bool
[src]
pub fn is_memory(&self) -> bool
Returns true
if the data is known to be in memory (Text | Bytes
)
Trait Implementations
impl From<String> for SavedData
[src]
impl From<String> for SavedData
impl From<Vec<u8>> for SavedData
[src]
impl From<Vec<u8>> for SavedData
impl Debug for SavedData
[src]
impl Debug for SavedData
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> Typeable for T where
T: Any,
impl<T> Typeable for T where
T: Any,
impl<T> DebugAny for T where
T: Any + Debug,
impl<T> DebugAny for T where
T: Any + Debug,
impl<T> UnsafeAny for T where
T: Any,
impl<T> UnsafeAny for T where
T: Any,