Struct rustsynth::map::MapRef

source ·
pub struct MapRef<'owner, 'elem> { /* private fields */ }
Expand description

A reference to a VapourSynth map.

Methods from Deref<Target = Map<'elem>>§

source

pub fn error(&self) -> Option<Cow<'_, str>>

Returns the error message contained in the map, if any.

source

pub fn key_count(&self) -> usize

Returns the number of keys contained in a map.

source

pub fn key(&self, index: usize) -> &str

Returns a key from a map.

Panics

Panics if index >= self.key_count().

source

pub fn keys(&self) -> Keys<'_, '_>

Returns an iterator over all keys in a map.

source

pub fn value_count(&self, key: &str) -> Result<usize>

Returns the number of elements associated with a key in a map.

source

pub fn value_type(&self, key: &str) -> Result<ValueType>

Retrieves a value type from a map.

source

pub fn get<'map, T: Value<'map, 'elem> + Sized>( &'map self, key: &str ) -> Result<T>

Retrieves a property value.

source

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.

source

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.

source

pub fn get_int_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, i64>>

Retrieves integers from a map.

source

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.

source

pub fn get_float_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, f64>>

Retrieves floating point numbers from a map.

source

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.

source

pub fn get_data_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, Data<'elem>>>

Retrieves data from a map.

source

pub fn get_string_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, String>>

Retrieves data from a map.

source

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.

source

pub fn get_node_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, Node<'elem>>>

Retrieves nodes from a map.

source

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.

source

pub fn get_frame_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, FrameRef<'elem>>>

Retrieves frames from a map.

source

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.

source

pub fn get_function_iter<'map>( &'map self, key: &str ) -> Result<ValueIter<'map, 'elem, Function<'elem>>>

Retrieves functions from a map.

source

pub fn get_int_array(&self, key: &str) -> Result<Vec<i64>>

Retrieves int array from a map.

source

pub fn get_float_array(&self, key: &str) -> Result<Vec<f64>>

Retrieves float array from a map.

source

pub fn data_type_hint(&self, key: &CStr, index: i32) -> DataType

Trait Implementations§

source§

impl<'owner, 'elem> Debug for MapRef<'owner, 'elem>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'owner, 'elem> Deref for MapRef<'owner, 'elem>

§

type Target = Map<'elem>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'owner, 'elem> RefUnwindSafe for MapRef<'owner, 'elem>

§

impl<'owner, 'elem> Send for MapRef<'owner, 'elem>

§

impl<'owner, 'elem> Sync for MapRef<'owner, 'elem>

§

impl<'owner, 'elem> Unpin for MapRef<'owner, 'elem>

§

impl<'owner, 'elem> UnwindSafe for MapRef<'owner, 'elem>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.