Struct twitter_card::Player

source ·
pub struct Player { /* private fields */ }
Expand description

Create a player card.

Player cards allow rich media to be embedded on Twitter. This includes, but is not limited to, audio clips and videos.

Read more

Implementations§

Create a new instance.

Title of content.

Panics.

Panics if the description is more than 70 characters.

@username of website. Either twitter:site or twitter:site:id is required.

Same as twitter:site, but the user’s Twitter ID. Either twitter:site or twitter:site:id is required.

Twitter user ID of content creator.

Description of content.

Panics.

Panics if the description is more than 200 characters.

URL of image to use in the card. Images must be less than 5MB in size. JPG, PNG, WEBP and GIF formats are supported. Only the first frame of an animated GIF will be used. SVG is not supported.

A text description of the image conveying the essential nature of an image to users who are visually impaired. Maximum 420 characters.

Panics.

Panics if the description is more than 420 characters.

HTTPS URL of player iframe

Width of iframe in pixels.

Height of iframe in pixels.

URL to raw video or audio stream.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Convert the Twitter Card to a string.

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

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.