pub struct DeckObject {
pub deck: Deck,
}Expand description
ยงExample
use twitter_archive::structs::tweetdeck::DeckObject;
let json = r#"{
"deck": {
"title": "Personal",
"columns": [
{
"pathname": "/home",
"title": "Home"
},
{
"pathname": "/notifications",
"title": "๐-Notifications"
},
{
"pathname": "/S0_And_S0",
"query": "from:S0_And_S0"
}
]
}
}"#;
let data: DeckObject = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.deck.title, "Personal");
assert_eq!(data.deck.columns.len(), 3);
// Re-serialize is equivalent to original data
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fieldsยง
ยงdeck: DeckยงExample JSON data
{
"deck": {
"title": "Personal",
"columns": [
{
"pathname": "/home",
"title": "Home"
},
{
"pathname": "/notifications",
"title": "๐-Notifications"
},
{
"pathname": "/S0_And_S0",
"query": "from:S0_And_S0"
}
]
}
}Trait Implementationsยง
Sourceยงimpl Clone for DeckObject
impl Clone for DeckObject
Sourceยงfn clone(&self) -> DeckObject
fn clone(&self) -> DeckObject
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 DeckObject
impl Debug for DeckObject
Sourceยงimpl<'de> Deserialize<'de> for DeckObject
impl<'de> Deserialize<'de> for DeckObject
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 DeckObject
impl Display for DeckObject
Auto Trait Implementationsยง
impl Freeze for DeckObject
impl RefUnwindSafe for DeckObject
impl Send for DeckObject
impl Sync for DeckObject
impl Unpin for DeckObject
impl UnwindSafe for DeckObject
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