pub struct Format {
pub filename: String,
pub nb_streams: i64,
pub nb_programs: i64,
pub format_name: String,
pub format_long_name: String,
pub start_time: Option<String>,
pub duration: Option<String>,
pub size: String,
pub bit_rate: Option<String>,
pub probe_score: i64,
pub tags: Option<FormatTags>,
}
Fields§
§filename: String
§nb_streams: i64
§nb_programs: i64
§format_name: String
§format_long_name: String
§start_time: Option<String>
§duration: Option<String>
§size: String
§bit_rate: Option<String>
§probe_score: i64
Implementations§
source§impl Format
impl Format
sourcepub fn try_get_duration(&self) -> Option<Result<Duration, ParseFloatError>>
pub fn try_get_duration(&self) -> Option<Result<Duration, ParseFloatError>>
Get the duration parsed into a std::time::Duration
.
sourcepub fn get_duration(&self) -> Option<Duration>
pub fn get_duration(&self) -> Option<Duration>
Get the duration parsed into a std::time::Duration
.
Will return None
if no duration is available, or if parsing fails.
See Self::try_get_duration
for a method that returns an error.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Format
impl<'de> Deserialize<'de> for Format
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Format
impl PartialEq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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