pub struct MultiValueMut<'borrow> { /* private fields */ }Expand description
An intermediate representation of a mutable multivar obtained from a File.
Implementations§
Source§impl MultiValueMut<'_>
impl MultiValueMut<'_>
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the multivar does not have any values. This might occur if the value was deleted but wasn’t yet set with a new value.
Sourcepub fn set_values<Iter, Item>(&mut self, values: Iter) -> Result<(), Error>where
Iter: IntoIterator<Item = Item>,
Item: AsBStr,
pub fn set_values<Iter, Item>(&mut self, values: Iter) -> Result<(), Error>where
Iter: IntoIterator<Item = Item>,
Item: AsBStr,
Sets all values to the provided ones. Note that this follows zip
logic: if the number of values in the input is less than the number of
values currently existing, then only the first n values are modified.
If more values are provided than there currently are, then the
remaining values are ignored.
Sourcepub fn set_all(&mut self, input: impl AsBStr) -> Result<(), Error>
pub fn set_all(&mut self, input: impl AsBStr) -> Result<(), Error>
Sets all values in this multivar to the provided one without owning the provided input.
Sourcepub fn delete(&mut self, index: usize)
pub fn delete(&mut self, index: usize)
Removes the value at the given index. Does nothing when called multiple times in succession.
§Safety
This will panic if the index is out of range.
Sourcepub fn delete_all(&mut self)
pub fn delete_all(&mut self)
Removes all values. Does nothing when called multiple times in succession.