pub struct MessageCreateUrl {
pub url: String,
pub expanded: String,
pub display: String,
}Expand description
§Example
use twitter_archive::structs::direct_message::MessageCreateUrl;
let json = r#"{
"url": "https://t.co/Yot7Ijm9vG",
"expanded": "https://github.com/S0AndS0/",
"display": "github.com/S0AndS0/"
}"#;
let data: MessageCreateUrl = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.url, "https://t.co/Yot7Ijm9vG");
assert_eq!(data.expanded, "https://github.com/S0AndS0/");
assert_eq!(data.display, "github.com/S0AndS0/");
// Re-serialize is equivalent to original data
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§url: String§expanded: String§display: StringWhat clients are able to view of URL within text
§Example JSON data
{ "display": "github.com/S0AndS0/" }Trait Implementations§
Source§impl Clone for MessageCreateUrl
impl Clone for MessageCreateUrl
Source§fn clone(&self) -> MessageCreateUrl
fn clone(&self) -> MessageCreateUrl
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 MessageCreateUrl
impl Debug for MessageCreateUrl
Source§impl<'de> Deserialize<'de> for MessageCreateUrl
impl<'de> Deserialize<'de> for MessageCreateUrl
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 MessageCreateUrl
impl Display for MessageCreateUrl
Auto Trait Implementations§
impl Freeze for MessageCreateUrl
impl RefUnwindSafe for MessageCreateUrl
impl Send for MessageCreateUrl
impl Sync for MessageCreateUrl
impl Unpin for MessageCreateUrl
impl UnwindSafe for MessageCreateUrl
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