Struct vapoursynth4_rs::map::Map

source ·
#[repr(transparent)]
pub struct Map { /* private fields */ }

Implementations§

source§

impl Map

source

pub fn new() -> Self

source

pub fn as_ptr(&self) -> *const VSMap

source

pub fn as_mut_ptr(&mut self) -> *mut VSMap

source

pub fn clear(&mut self)

source

pub fn set_error(&mut self, msg: &CStr)

source

pub fn get_error(&self) -> Option<&CStr>

source

pub fn len(&self) -> i32

source

pub fn is_empty(&self) -> bool

source

pub fn get_key(&self, index: i32) -> &KeyStr

Panics

Panics if index is out of bounds.

source

pub fn delete_key(&mut self, key: &KeyStr)

source

pub fn num_elements(&self, key: &KeyStr) -> Option<i32>

source

pub fn get_int(&self, key: &KeyStr, index: i32) -> Result<i64, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_float( &self, key: &KeyStr, index: i32 ) -> Result<f64, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_binary( &self, key: &KeyStr, index: i32 ) -> Result<&[u8], MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_utf8( &self, key: &KeyStr, index: i32 ) -> Result<&str, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_function( &self, key: &KeyStr, index: i32 ) -> Result<Function, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_video_node( &self, key: &KeyStr, index: i32 ) -> Result<VideoNode, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_audio_node( &self, key: &KeyStr, index: i32 ) -> Result<AudioNode, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_video_frame( &self, key: &KeyStr, index: i32 ) -> Result<VideoFrame, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_audio_frame( &self, key: &KeyStr, index: i32 ) -> Result<AudioFrame, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get( &self, key: &KeyStr, index: i32 ) -> Result<Value<'_>, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_int_saturated( &self, key: &KeyStr, index: i32 ) -> Result<i32, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_int_array(&self, key: &KeyStr) -> Result<&[i64], MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_float_saturated( &self, key: &KeyStr, index: i32 ) -> Result<f32, MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn get_float_array(&self, key: &KeyStr) -> Result<&[f64], MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn set_empty(&mut self, key: &KeyStr, type_: VSPropertyType)

Panics

Panics if the key exists or is invalid

source

pub fn set( &mut self, key: &KeyStr, val: Value<'_>, append: AppendMode ) -> Result<(), MapPropertyError>

Errors

Return MapPropertyError::InvalidType if the key’s type is not the same with val

Panics

Panic if the Value::Data’s or Value::Utf8’s len is larger than i32::MAX

source

pub fn set_int_array( &mut self, key: &KeyStr, val: &[i64] ) -> Result<(), MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

Panics

Panic if the val.len() is larger than i32::MAX

source

pub fn set_float_array( &mut self, key: &KeyStr, val: &[f64] ) -> Result<(), MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

Panics

Panic if the val.len() is larger than i32::MAX

source

pub fn consume_node( &mut self, key: &KeyStr, node: impl Node, append: AppendMode ) -> Result<(), MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn consume_frame( &mut self, key: &KeyStr, frame: impl Frame, append: AppendMode ) -> Result<(), MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

source

pub fn consume_function( &mut self, key: &KeyStr, function: Function, append: AppendMode ) -> Result<(), MapPropertyError>

Errors

Return MapPropertyError if the underlying API does not success

Trait Implementations§

source§

impl Clone for Map

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Map

source§

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

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

impl Default for Map

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Drop for Map

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Hash for Map

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Map> for Map

source§

fn eq(&self, other: &Map) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Map

source§

impl StructuralEq for Map

source§

impl StructuralPartialEq for Map

Auto Trait Implementations§

§

impl RefUnwindSafe for Map

§

impl !Send for Map

§

impl !Sync for Map

§

impl Unpin for Map

§

impl UnwindSafe for Map

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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.