Skip to main content

DictionaryRef

Struct DictionaryRef 

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

Implementations§

Source§

impl<'d> DictionaryRef<'d>

Source

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

Source

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

Source§

impl<'a> DictionaryRef<'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> DictionaryRef<'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> DictionaryRef<'a>

Source

pub fn len(&self) -> usize

Returns the number of entries in the dictionary.

Source§

impl<'a> DictionaryRef<'a>

Source

pub fn is_empty(&self) -> bool

Returns true if the dictionary is empty.

Source§

impl<'a> DictionaryRef<'a>

Source

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

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

Source§

impl<'d> DictionaryRef<'d>

Source

pub fn to_owned(&self) -> Dictionary

Clones the borrowed data into an owned Dictionary.

Trait Implementations§

Source§

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

Source§

fn as_ptr(&self) -> *const AVDictionary

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

impl<'a> Debug for DictionaryRef<'a>

Source§

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

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

impl<'a> IntoIterator for &'a DictionaryRef<'a>

Source§

type Item = (&'a str, &'a str)

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<'d> Freeze for DictionaryRef<'d>

§

impl<'d> RefUnwindSafe for DictionaryRef<'d>

§

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

§

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

§

impl<'d> Unpin for DictionaryRef<'d>

§

impl<'d> UnsafeUnpin for DictionaryRef<'d>

§

impl<'d> UnwindSafe for DictionaryRef<'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.