pub struct File {
pub file_name: String,
pub global_name: String,
pub count: usize,
}Expand description
Points to file path within zip archive and describes JavaScript pointer data may be accessed
§Example
use twitter_archive::structs::manifest::File;
let json = r#"{
"fileName": "data/twitter-shop.js",
"globalName": "YTD.twitter_shop.part0",
"count": "0"
}"#;
let data: File = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.file_name, "data/twitter-shop.js");
assert_eq!(data.global_name, "YTD.twitter_shop.part0");
assert_eq!(data.count, 0);
// Re-serialize is equivalent to original data without pretty printing
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§file_name: String§global_name: StringJavaScript Object pointer(s) to data if loaded by web-browser
§Example JSON data
{ "globalName": "YTD.twitter_shop.part0" }count: usizeCount seems to not be directly associated with number of files; perhaps it provides a count of JSON objects within a given file?
§Example JSON data
{ "count": "0" }Trait Implementations§
Source§impl<'de> Deserialize<'de> for File
impl<'de> Deserialize<'de> for File
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
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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