Skip to main content

Dictionary

Struct Dictionary 

Source
pub struct Dictionary { /* private fields */ }

Implementations§

Source§

impl Dictionary

Source

pub fn get<K: AsRef<str>>(&self, key: K) -> Option<&str>

Try to find a value in the dictionary.

This function uses case-insensitive matching of the entire key string to find a value. If you want to customize the way FFmpeg searches for the key, see get_with_flags.

Source§

impl Dictionary

Source

pub fn get_with_flags<K: AsRef<str>>( &self, key: K, flags: Flags, ) -> Option<&str>

Try to find a value in the dictionary, using custom search flags.

See Flags to see how each flag works. Using Flags::DONT_STRDUP_KEY is heavily discouraged unless you know what you are doing.

Source§

impl Dictionary

Source

pub fn len(&self) -> usize

Returns the number of entries in the dictionary.

Source§

impl Dictionary

Source

pub fn is_empty(&self) -> bool

Returns true if the dictionary is empty.

Source§

impl Dictionary

Source

pub fn iter(&self) -> Iter<'_>

Creates an iterator over all key-value pairs in the dictionary.

Source§

impl Dictionary

Source

pub fn set<K, V>(&mut self, key: K, value: V)
where K: AsRef<str>, V: AsRef<str>,

Set a value for the given key.

This function will overwrite any value that already exists for the given key. If you want to customize the way FFmpeg inserts the new value, see set_with_flags.

Source§

impl Dictionary

Source

pub fn set_with_flags<K, V>(&mut self, key: K, value: V, flags: Flags)
where K: AsRef<str>, V: AsRef<str>,

Set a value for the given key, using custom flags.

See Flags to see how each flag works. Using Flags::DONT_STRDUP_KEY or Flags::DONT_STRDUP_VAL is heavily discouraged unless you know what you are doing.

Source§

impl Dictionary

Source

pub fn unset<K: AsRef<str>>(&mut self, key: K)

Remove a value from the dictionary for the given key.

If you want to customize the way FFmpeg searches for the key, see unset_with_flags.

Source§

impl Dictionary

Source

pub fn unset_with_flags<K: AsRef<str>>(&mut self, key: K, flags: Flags)

Remove a value from the dictionary for the given key, using custom flags.

See Flags to see how each flag works. Using Flags::DONT_STRDUP_KEY or Flags::DONT_STRDUP_VAL is heavily discouraged unless you know what you are doing.

Source§

impl Dictionary

Source

pub unsafe fn from_raw(ptr: *mut AVDictionary) -> Self

Source

pub fn into_raw(self) -> *mut AVDictionary

Source

pub fn replace_with(&mut self, new: Self)

Source

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

Source

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

Source

pub fn as_ref(&self) -> DictionaryRef<'_>

Source

pub fn as_mut(&mut self) -> DictionaryMut<'_>

Source§

impl Dictionary

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl AsMutPtr<*mut AVDictionary> for Dictionary

Source§

fn as_mut_ptr(&mut self) -> *mut *mut AVDictionary

Returns a *mut raw pointer to the underlying FFmpeg type.
Source§

impl AsPtr<AVDictionary> for Dictionary

Source§

fn as_ptr(&self) -> *const AVDictionary

Returns a *const raw pointer to the underlying FFmpeg type.
Source§

impl Clone for Dictionary

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Dictionary

Source§

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

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

impl Default for Dictionary

Source§

fn default() -> Self

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

impl Drop for Dictionary

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<S, U> FromIterator<(S, U)> for Dictionary
where S: AsRef<str>, U: AsRef<str>,

Source§

fn from_iter<T: IntoIterator<Item = (S, U)>>(iter: T) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.