pub struct Dictionary { /* private fields */ }Expand description
An ordered collection of key = value options.
Implementations§
Source§impl Dictionary
impl Dictionary
pub fn new() -> Dictionary
pub fn set(&mut self, key: impl Into<String>, value: impl Into<String>)
pub fn get(&self, key: &str) -> Option<&str>
Sourcepub fn get_int(&self, key: &str) -> Option<i64>
pub fn get_int(&self, key: &str) -> Option<i64>
Parse an integer-valued option, returning None if absent or malformed.
Sourcepub fn get_bitrate(&self, key: &str) -> Option<i64>
pub fn get_bitrate(&self, key: &str) -> Option<i64>
Parse a bitrate-valued option with FFmpeg’s k/M suffixes
(128k → 128 000, 1M → 1 000 000; a bare number is taken as-is).
Case-insensitive; returns None if absent or malformed.
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = (&str, &str)>
Trait Implementations§
Source§impl Clone for Dictionary
impl Clone for Dictionary
Source§fn clone(&self) -> Dictionary
fn clone(&self) -> Dictionary
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Dictionary
impl Debug for Dictionary
Source§impl Default for Dictionary
impl Default for Dictionary
Source§fn default() -> Dictionary
fn default() -> Dictionary
Returns the “default value” for a type. Read more
impl Eq for Dictionary
Source§impl PartialEq for Dictionary
impl PartialEq for Dictionary
impl StructuralPartialEq for Dictionary
Auto Trait Implementations§
impl Freeze for Dictionary
impl RefUnwindSafe for Dictionary
impl Send for Dictionary
impl Sync for Dictionary
impl Unpin for Dictionary
impl UnsafeUnpin for Dictionary
impl UnwindSafe for Dictionary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more