[−][src]Struct multipart::server::save::Entries
A result of Multipart::save()
.
Fields
fields: HashMap<ArcStr, Vec<SavedField>>
The fields of the multipart request, mapped by field name -> value.
A field name may have multiple actual fields associated with it, but the most common case is a single field.
Each vector is guaranteed not to be empty unless externally modified.
save_dir: SaveDir
The directory that the entries in fields
were saved into.
Methods
impl Entries
[src]
impl Entries
pub fn new(save_dir: SaveDir) -> Self
[src]
pub fn new(save_dir: SaveDir) -> Self
Create a new Entries
with the given SaveDir
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Returns true
if fields
is empty, false
otherwise.
pub fn fields_count(&self) -> u32
[src]
pub fn fields_count(&self) -> u32
The number of actual fields contained within this Entries
.
Effectively self.fields.values().map(Vec::len).sum()
but maintained separately.
Note
This will be incorrect if fields
is modified externally. Call recount_fields()
to get the correct count.
pub fn recount_fields(&mut self) -> u32
[src]
pub fn recount_fields(&mut self) -> u32
Sum the number of fields in this Entries
and then return the updated value.
pub fn print_debug(&self) -> Result<()>
[src]
pub fn print_debug(&self) -> Result<()>
Print all fields and their contents to stdout. Mostly for testing purposes.
pub fn write_debug<W: Write>(&self, writer: W) -> Result<()>
[src]
pub fn write_debug<W: Write>(&self, writer: W) -> Result<()>
Write all fields and their contents to the given output. Mostly for testing purposes.
Trait Implementations
impl<M: ReadEntry> Into<Entries> for PartialEntries<M>
[src]
impl<M: ReadEntry> Into<Entries> for PartialEntries<M>
Discards partial
impl Debug for Entries
[src]
impl Debug for Entries
impl Key for Entries
[src]
impl Key for Entries
type Value = Self
The value type associated with this key type.
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
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> 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> 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
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> 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,