pub struct FileObject {
pub files: Vec<File>,
}Expand description
Data structure common to most non-media manifest.dataTypes
§Example
use twitter_archive::structs::manifest::FileObject;
let json = r#"{
"files": [
{
"fileName": "data/twitter-shop.js",
"globalName": "YTD.twitter_shop.part0",
"count": "0"
}
]
}"#;
let data: FileObject = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.files.len(), 1);
assert_eq!(data.files[0].file_name, "data/twitter-shop.js");
assert_eq!(data.files[0].global_name, "YTD.twitter_shop.part0");
assert_eq!(data.files[0].count, 0);
// Re-serialize is equivalent to original data without pretty printing
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§files: Vec<File>List of metadata pointers to JavaScript/JSON files
§Example JSON data
{
"files": [
{
"fileName": "data/twitter-shop.js",
"globalName": "YTD.twitter_shop.part0",
"count": "0"
}
]
}Trait Implementations§
Source§impl Clone for FileObject
impl Clone for FileObject
Source§fn clone(&self) -> FileObject
fn clone(&self) -> FileObject
Returns a duplicate of the value. Read more
1.0.0 · 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 FileObject
impl Debug for FileObject
Source§impl<'de> Deserialize<'de> for FileObject
impl<'de> Deserialize<'de> for FileObject
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 Display for FileObject
impl Display for FileObject
Auto Trait Implementations§
impl Freeze for FileObject
impl RefUnwindSafe for FileObject
impl Send for FileObject
impl Sync for FileObject
impl Unpin for FileObject
impl UnwindSafe for FileObject
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