Skip to main content

DictionaryMut

Struct DictionaryMut 

Source
pub struct DictionaryMut<'d> { /* private fields */ }

Implementations§

Source§

impl<'a> DictionaryMut<'a>

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<'a> DictionaryMut<'a>

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<'a> DictionaryMut<'a>

Source

pub fn len(&self) -> usize

Returns the number of entries in the dictionary.

Source§

impl<'a> DictionaryMut<'a>

Source

pub fn is_empty(&self) -> bool

Returns true if the dictionary is empty.

Source§

impl<'a> DictionaryMut<'a>

Source

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

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

Source§

impl<'a> DictionaryMut<'a>

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<'a> DictionaryMut<'a>

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<'a> DictionaryMut<'a>

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<'a> DictionaryMut<'a>

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<'d> DictionaryMut<'d>

Source

pub fn to_owned(&self) -> Dictionary

Clones the borrowed data into an owned Dictionary.

Source§

impl<'d> DictionaryMut<'d>

Source

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

Source

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

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<'d>

Trait Implementations§

Source§

impl<'d> AsMutPtr<*mut AVDictionary> for DictionaryMut<'d>

Source§

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

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

impl<'d> AsPtr<AVDictionary> for DictionaryMut<'d>

Source§

fn as_ptr(&self) -> *const AVDictionary

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

impl<'d> Debug for DictionaryMut<'d>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'d> Freeze for DictionaryMut<'d>

§

impl<'d> RefUnwindSafe for DictionaryMut<'d>

§

impl<'d> !Send for DictionaryMut<'d>

§

impl<'d> !Sync for DictionaryMut<'d>

§

impl<'d> Unpin for DictionaryMut<'d>

§

impl<'d> UnsafeUnpin for DictionaryMut<'d>

§

impl<'d> !UnwindSafe for DictionaryMut<'d>

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> 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, 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.