pub struct CachedFile {Show 15 fields
pub id: String,
pub filename: String,
pub relative_path: String,
pub video_id: Option<String>,
pub file_type: String,
pub format_id: Option<String>,
pub format_json: Option<String>,
pub video_quality: Option<String>,
pub audio_quality: Option<String>,
pub video_codec: Option<String>,
pub audio_codec: Option<String>,
pub language_code: Option<String>,
pub filesize: i64,
pub mime_type: String,
pub cached_at: i64,
}Expand description
Structure for storing downloaded file metadata in cache.
Fields§
§id: StringThe ID of the file (SHA-256 hash of the content).
filename: StringThe original filename.
relative_path: StringThe path to the file relative to the cache directory.
video_id: Option<String>The video ID this file is associated with (if any).
file_type: StringThe file type (format, thumbnail, etc.)
format_id: Option<String>The format ID this file is associated with (if any).
format_json: Option<String>The format information serialized as JSON (if available).
video_quality: Option<String>The video quality preference used to select this format (if any).
audio_quality: Option<String>The audio quality preference used to select this format (if any).
video_codec: Option<String>The video codec preference used to select this format (if any).
audio_codec: Option<String>The audio codec preference used to select this format (if any).
language_code: Option<String>The language code for subtitle files (if any).
filesize: i64The file size in bytes.
mime_type: StringThe MIME type of the file.
cached_at: i64The cache timestamp (Unix timestamp).
Implementations§
Source§impl CachedFile
impl CachedFile
Sourcepub fn matches_preferences(&self, preferences: &FormatPreferences) -> bool
pub fn matches_preferences(&self, preferences: &FormatPreferences) -> bool
Checks if this cached file matches the given preferences.
Trait Implementations§
Source§impl Clone for CachedFile
impl Clone for CachedFile
Source§fn clone(&self) -> CachedFile
fn clone(&self) -> CachedFile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CachedFile
impl Debug for CachedFile
Source§impl<'de> Deserialize<'de> for CachedFile
impl<'de> Deserialize<'de> for CachedFile
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>,
Source§impl Display for CachedFile
impl Display for CachedFile
Source§impl PartialEq for CachedFile
impl PartialEq for CachedFile
Source§impl Serialize for CachedFile
impl Serialize for CachedFile
impl StructuralPartialEq for CachedFile
Auto Trait Implementations§
impl Freeze for CachedFile
impl RefUnwindSafe for CachedFile
impl Send for CachedFile
impl Sync for CachedFile
impl Unpin for CachedFile
impl UnsafeUnpin for CachedFile
impl UnwindSafe for CachedFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CommonTraits for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.