pub struct OwnedMap<'elem> { /* private fields */ }
Expand description
An owned VapourSynth map.
Implementations§
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 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 get<'map, T: Value<'map, 'elem> + Sized>(
&'map self,
key: &str
) -> Result<T>
pub fn get<'map, T: Value<'map, 'elem> + Sized>( &'map self, key: &str ) -> Result<T>
Retrieves a property value.
sourcepub fn get_iter<'map, T: ValueNotArray<'map, 'elem>>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, T>>
pub fn get_iter<'map, T: ValueNotArray<'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: ValueNotArray<'map, 'elem>>(
&'map mut self,
key: &str,
x: &T
) -> Result<()>
pub fn append<'map, T: ValueNotArray<'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_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_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<Data<'elem>>
pub fn get_data(&self, key: &str) -> Result<Data<'elem>>
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, Data<'elem>>>
pub fn get_data_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, Data<'elem>>>
Retrieves data from a map.
sourcepub fn get_string_iter<'map>(
&'map self,
key: &str
) -> Result<ValueIter<'map, 'elem, String>>
pub fn get_string_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, String>>
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.
pub fn data_type_hint(&self, key: &CStr, index: i32) -> DataType
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_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_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.
sourcepub fn set_frame(&mut self, key: &str, x: &Frame<'elem>) -> Result<()>
pub fn set_frame(&mut self, key: &str, x: &Frame<'elem>) -> Result<()>
Sets a property value to a frame.
sourcepub fn set_function(&mut self, key: &str, x: &Function<'elem>) -> Result<()>
pub fn set_function(&mut self, key: &str, x: &Function<'elem>) -> Result<()>
Sets a property value to a function.