Crate twitter_card

Source
Expand description

Generate HTML for Twitter Card integration.

§Example

use twitter_card::{Summary, TwitterCard};

let card = Summary::builder()
  .site("@flickr")
  .title("Small Island Developing States Photo Submission")
  .desc("View the album on Flickr.")
  .image("https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg")
  .build();
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@flickr" />
<meta name="twitter:title" content="Small Island Developing States Photo Submission" />
<meta name="twitter:description" content="View the album on Flickr." />
<meta name="twitter:image" content="https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg" />

Structs§

App
Create an app card.
Player
Create a player card.
Summary
Create a summary card.
SummaryLargeImage
Create a summary with large image card.

Traits§

TwitterCard
Twitter Card.

Functions§

create_app_id_googleplay
Create a Twitter app id Google Play tag.
create_app_id_ipad
Create a Twitter app id iPad tag.
create_app_id_iphone
Create a Twitter app id iPhone tag.
create_app_name_googleplay
Create a Twitter app name Google Play tag.
create_app_name_ipad
Create a Twitter app name iPad tag.
create_app_name_iphone
Create a Twitter app name iPhone tag.
create_app_url_googleplay
Create a Twitter app url Google Play tag.
create_app_url_ipad
Create a Twitter app url iPad tag.
create_app_url_iphone
Create a Twitter app url iPhone tag.
create_card
Create a Twitter card tag.
create_creator
Create a Twitter creator tag.
create_creator_id
Create a Twitter creator id tag.
create_desc
Create a Twitter description tag.
create_image
Create a Twitter image tag.
create_image_alt
Create a Twitter image alt tag.
create_player
Create a Twitter player tag.
create_player_height
Create a Twitter player height tag.
create_player_stream
Create a Twitter player stream tag.
create_player_width
Create a Twitter player width tag.
create_site
Create a Twitter site tag.
create_site_id
Create a Twitter site id tag.
create_title
Create a Twitter title tag.