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>

The URL that ended up serving content, after all redirects

§original_url: Option<&'a str>

The original url, before any redirects

§item_type: Option<&'a str>

The type of webpage Apple thinks the link represents

§images: Vec<&'a str>

Up to 4 image previews displayed in the background of the bubble

§icons: Vec<&'a str>

Icons that represent the website, generally the favicon or apple-touch-icon

§site_name: Option<&'a str>

The name of a website

§placeholder: bool

Implementations§

Get the redirected URL from a URL message, falling back to the original URL, if it exists

Trait Implementations§

Creates the object from a HashMap of item attributes
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.