pub struct URLMessage<'a> {
pub title: Option<&'a str>,
pub summary: Option<&'a str>,
pub url: Option<&'a str>,
pub original_url: Option<&'a str>,
pub item_type: Option<&'a str>,
pub images: Vec<&'a str>,
pub icons: Vec<&'a str>,
pub site_name: Option<&'a str>,
pub placeholder: bool,
}Expand description
This struct is not documented by Apple, but represents messages created by
com.apple.messages.URLBalloonProvider.
Fields§
§title: Option<&'a str>The webpage’s <og:title> attribute
summary: Option<&'a str>The webpage’s <og:description> attribute
url: Option<&'a str>URL that served the preview content.
original_url: Option<&'a str>Original URL before redirects.
item_type: Option<&'a str>Apple-provided item type.
images: Vec<&'a str>Up to 4 image previews displayed in the background of the bubble
icons: Vec<&'a str>Website icon URLs.
site_name: Option<&'a str>Website name.
placeholder: booltrue when Messages stored the link as an unloaded placeholder preview.
Implementations§
Source§impl<'a> URLMessage<'a>
impl<'a> URLMessage<'a>
Sourcepub fn get_url_message_override(
payload: &'a Value,
) -> Result<URLOverride<'a>, PlistParseError>
pub fn get_url_message_override( payload: &'a Value, ) -> Result<URLOverride<'a>, PlistParseError>
Parse the concrete URL-balloon subtype from the payload.
Sourcepub fn get_url(&self) -> Option<&str>
pub fn get_url(&self) -> Option<&str>
Resolve this message’s URL via HasUrl::get_url.
Trait Implementations§
Source§impl<'a> BalloonProvider<'a> for URLMessage<'a>
impl<'a> BalloonProvider<'a> for URLMessage<'a>
Source§impl<'a> Debug for URLMessage<'a>
impl<'a> Debug for URLMessage<'a>
Source§impl<'a> Default for URLMessage<'a>
impl<'a> Default for URLMessage<'a>
Source§fn default() -> URLMessage<'a>
fn default() -> URLMessage<'a>
Returns the “default value” for a type. Read more
impl<'a> Eq for URLMessage<'a>
Source§impl HasUrl for URLMessage<'_>
impl HasUrl for URLMessage<'_>
Source§impl<'a> PartialEq for URLMessage<'a>
impl<'a> PartialEq for URLMessage<'a>
Source§fn eq(&self, other: &URLMessage<'a>) -> bool
fn eq(&self, other: &URLMessage<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for URLMessage<'a>
Auto Trait Implementations§
impl<'a> Freeze for URLMessage<'a>
impl<'a> RefUnwindSafe for URLMessage<'a>
impl<'a> Send for URLMessage<'a>
impl<'a> Sync for URLMessage<'a>
impl<'a> Unpin for URLMessage<'a>
impl<'a> UnsafeUnpin for URLMessage<'a>
impl<'a> UnwindSafe for URLMessage<'a>
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.