Struct vapoursynth::map::MapRefMut
source · [−]pub struct MapRefMut<'owner, 'elem> { /* private fields */ }
Expand description
A reference to a mutable VapourSynth map.
Methods from Deref<Target = Map<'elem>>
sourcepub fn error(&self) -> Option<Cow<'_, str>>
pub fn error(&self) -> Option<Cow<'_, str>>
Returns the error message contained in the map, if any.
sourcepub fn set_error(&mut self, error_message: &str) -> Result<()>
pub fn set_error(&mut self, error_message: &str) -> Result<()>
Adds an error message to a map. The map is cleared first.
sourcepub fn keys(&self) -> Keys<'_, '_>ⓘNotable traits for Keys<'map, 'elem>impl<'map, 'elem> Iterator for Keys<'map, 'elem> type Item = &'map str;
pub fn keys(&self) -> Keys<'_, '_>ⓘNotable traits for Keys<'map, 'elem>impl<'map, 'elem> Iterator for Keys<'map, 'elem> type Item = &'map str;
Returns an iterator over all keys in a map.
sourcepub fn value_count(&self, key: &str) -> Result<usize>
pub fn value_count(&self, key: &str) -> Result<usize>
Returns the number of elements associated with a key in a map.
sourcepub fn value_type(&self, key: &str) -> Result<ValueType>
pub fn value_type(&self, key: &str) -> Result<ValueType>
Retrieves a value type from a map.
sourcepub fn delete_key(&mut self, key: &str) -> Result<()>
pub fn delete_key(&mut self, key: &str) -> Result<()>
Deletes the given key.
sourcepub fn touch(&mut self, key: &str, value_type: ValueType) -> Result<()>
pub fn touch(&mut self, key: &str, value_type: ValueType) -> Result<()>
Touches the key. That is, if the key exists, nothing happens, otherwise a key is created with no values associated.
sourcepub fn get<'map, T: Value<'map, 'elem>>(&'map self, key: &str) -> Result<T>
pub fn get<'map, T: Value<'map, 'elem>>(&'map self, key: &str) -> Result<T>
Retrieves a property value.
sourcepub fn get_iter<'map, T: Value<'map, 'elem>>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, T>>
pub fn get_iter<'map, T: Value<'map, 'elem>>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, T>>
Retrieves an iterator over the map values.
sourcepub fn set<'map, T: Value<'map, 'elem>>(
&'map mut self,
key: &str,
x: &T
) -> Result<()>
pub fn set<'map, T: Value<'map, 'elem>>(
&'map mut self,
key: &str,
x: &T
) -> Result<()>
Sets a property value.
sourcepub fn append<'map, T: Value<'map, 'elem>>(
&'map mut self,
key: &str,
x: &T
) -> Result<()>
pub fn append<'map, T: Value<'map, 'elem>>(
&'map mut self,
key: &str,
x: &T
) -> Result<()>
Appends a property value.
sourcepub fn get_int(&self, key: &str) -> Result<i64>
pub fn get_int(&self, key: &str) -> Result<i64>
Retrieves an integer from a map.
This function retrieves the first value associated with the key.
sourcepub fn get_int_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, i64>>
pub fn get_int_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, i64>>
Retrieves integers from a map.
sourcepub fn get_int_array(&self, key: &str) -> Result<&[i64]>
pub fn get_int_array(&self, key: &str) -> Result<&[i64]>
Retrieves an array of integers from a map.
This is faster than iterating over a get_int_iter()
.
sourcepub fn get_float(&self, key: &str) -> Result<f64>
pub fn get_float(&self, key: &str) -> Result<f64>
Retrieves a floating point number from a map.
This function retrieves the first value associated with the key.
sourcepub fn get_float_array(&self, key: &str) -> Result<&[f64]>
pub fn get_float_array(&self, key: &str) -> Result<&[f64]>
Retrieves an array of floating point numbers from a map.
This is faster than iterating over a get_float_iter()
.
sourcepub fn get_float_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, f64>>
pub fn get_float_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, f64>>
Retrieves floating point numbers from a map.
sourcepub fn get_data(&self, key: &str) -> Result<&[u8]>
pub fn get_data(&self, key: &str) -> Result<&[u8]>
Retrieves data from a map.
This function retrieves the first value associated with the key.
sourcepub fn get_data_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, &'map [u8]>>
pub fn get_data_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, &'map [u8]>>
Retrieves data from a map.
sourcepub fn get_node(&self, key: &str) -> Result<Node<'elem>>
pub fn get_node(&self, key: &str) -> Result<Node<'elem>>
Retrieves a node from a map.
This function retrieves the first value associated with the key.
sourcepub fn get_node_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, Node<'elem>>>
pub fn get_node_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, Node<'elem>>>
Retrieves nodes from a map.
sourcepub fn get_frame(&self, key: &str) -> Result<FrameRef<'elem>>
pub fn get_frame(&self, key: &str) -> Result<FrameRef<'elem>>
Retrieves a frame from a map.
This function retrieves the first value associated with the key.
sourcepub fn get_frame_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, FrameRef<'elem>>>
pub fn get_frame_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, FrameRef<'elem>>>
Retrieves frames from a map.
sourcepub fn get_function(&self, key: &str) -> Result<Function<'elem>>
pub fn get_function(&self, key: &str) -> Result<Function<'elem>>
Retrieves a function from a map.
This function retrieves the first value associated with the key.
sourcepub fn get_function_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, Function<'elem>>>
pub fn get_function_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, Function<'elem>>>
Retrieves functions from a map.
sourcepub fn append_float(&mut self, key: &str, x: f64) -> Result<()>
pub fn append_float(&mut self, key: &str, x: f64) -> Result<()>
Appends a floating point number to a map.
sourcepub fn append_node(&mut self, key: &str, x: &Node<'elem>) -> Result<()>
pub fn append_node(&mut self, key: &str, x: &Node<'elem>) -> Result<()>
Appends a node to a map.
sourcepub fn append_frame(&mut self, key: &str, x: &Frame<'elem>) -> Result<()>
pub fn append_frame(&mut self, key: &str, x: &Frame<'elem>) -> Result<()>
Appends a frame to a map.
sourcepub fn append_function(&mut self, key: &str, x: &Function<'elem>) -> Result<()>
pub fn append_function(&mut self, key: &str, x: &Function<'elem>) -> Result<()>
Appends a function to a map.
sourcepub fn set_int(&mut self, key: &str, x: i64) -> Result<()>
pub fn set_int(&mut self, key: &str, x: i64) -> Result<()>
Sets a property value to an integer.
sourcepub fn set_int_array(&mut self, key: &str, x: &[i64]) -> Result<()>
pub fn set_int_array(&mut self, key: &str, x: &[i64]) -> Result<()>
Sets a property value to an integer array.
This is faster than calling append_int()
in a loop.
sourcepub fn set_float(&mut self, key: &str, x: f64) -> Result<()>
pub fn set_float(&mut self, key: &str, x: f64) -> Result<()>
Sets a property value to a floating point number.
sourcepub fn set_float_array(&mut self, key: &str, x: &[f64]) -> Result<()>
pub fn set_float_array(&mut self, key: &str, x: &[f64]) -> Result<()>
Sets a property value to a floating point number array.
This is faster than calling append_float()
in a loop.
sourcepub fn set_node(&mut self, key: &str, x: &Node<'elem>) -> Result<()>
pub fn set_node(&mut self, key: &str, x: &Node<'elem>) -> Result<()>
Sets a property value to a node.
Trait Implementations
Auto Trait Implementations
impl<'owner, 'elem> RefUnwindSafe for MapRefMut<'owner, 'elem>
impl<'owner, 'elem> Send for MapRefMut<'owner, 'elem>
impl<'owner, 'elem> Sync for MapRefMut<'owner, 'elem>
impl<'owner, 'elem> Unpin for MapRefMut<'owner, 'elem>
impl<'owner, 'elem> UnwindSafe for MapRefMut<'owner, 'elem>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more