OpenGraphBuilder

Struct OpenGraphBuilder 

Source
pub struct OpenGraphBuilder<M: OpenGraphTypeMarker> { /* private fields */ }

Implementations§

Source§

impl<M: OpenGraphTypeMarker> OpenGraphBuilder<M>

Source

pub fn new(title: impl Into<&'static str>, image: Url, url: Url) -> Self

Source

pub fn image_secure_url(self, image_secure_url: Url) -> Self

Source

pub fn image_type(self, image_type: impl Into<&'static str>) -> Self

Source

pub fn image_width(self, image_width: isize) -> Self

Source

pub fn image_height(self, image_height: isize) -> Self

Source

pub fn image_alt(self, image_alt: impl Into<&'static str>) -> Self

Source

pub fn audio(self, audio: Url) -> Self

Source

pub fn audio_secure_url(self, audio_secure_url: Url) -> Self

Source

pub fn audio_type(self, audio_type: impl Into<&'static str>) -> Self

Source

pub fn description(self, description: impl Into<&'static str>) -> Self

Source

pub fn determiner(self, determiner: Determiner) -> Self

Source

pub fn locale(self, locale: impl Into<&'static str>) -> Self

Source

pub fn locale_alternate(self, locales: Vec<impl Into<&'static str>>) -> Self

Source

pub fn site_name(self, site_name: impl Into<&'static str>) -> Self

Source

pub fn video(self, video: Url) -> Self

Source

pub fn video_secure_url(self, video_secure_url: Url) -> Self

Source

pub fn video_type(self, video_type: impl Into<&'static str>) -> Self

Source

pub fn video_width(self, video_width: isize) -> Self

Source

pub fn video_height(self, video_height: isize) -> Self

Source

pub fn video_alt(self, video_tag: impl Into<&'static str>) -> Self

Source

pub fn custom( self, key: impl Into<&'static str>, value: impl Into<&'static str>, ) -> Self

Source

pub fn build(self) -> OpenGraph

Source§

impl OpenGraphBuilder<MusicSong>

Source

pub fn music_duration(self, music_duration: isize) -> Self

Source

pub fn music_album(self, music_album: Url) -> Self

Source

pub fn music_album_disc(self, music_album_disc: isize) -> Self

Source

pub fn music_album_track(self, music_album_track: isize) -> Self

Source

pub fn music_musician(self, music_musician: Url) -> Self

Source§

impl OpenGraphBuilder<MusicAlbum>

Source

pub fn music_song(self, music_song: Url) -> Self

Source

pub fn music_song_disc(self, music_song_disc: isize) -> Self

Source

pub fn music_song_track(self, music_song_track: isize) -> Self

Source

pub fn music_musician(self, music_musician: Url) -> Self

Source

pub fn music_release_date(self, music_release_date: SystemTime) -> Self

Source

pub fn music_release_date_chrono( self, music_release_date: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source§

impl OpenGraphBuilder<MusicPlaylist>

Source

pub fn music_song(self, music_song: Url) -> Self

Source

pub fn music_song_disc(self, music_song_disc: isize) -> Self

Source

pub fn music_song_track(self, music_song_track: isize) -> Self

Source

pub fn music_creator(self, music_creator: Url) -> Self

Source§

impl OpenGraphBuilder<MusicRadioStation>

Source

pub fn music_creator(self, music_creator: Url) -> Self

Source§

impl OpenGraphBuilder<VideoMovie>

Source

pub fn video_actor(self, video_actor: Url) -> Self

Source

pub fn video_actor_role(self, video_actor_role: impl Into<&'static str>) -> Self

Source

pub fn video_director(self, video_director: Url) -> Self

Source

pub fn video_writer(self, video_writer: Url) -> Self

Source

pub fn video_duration(self, video_duration: isize) -> Self

Source

pub fn video_release_date(self, video_release_date: SystemTime) -> Self

Source

pub fn video_release_date_chrono( self, video_release_date: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn video_tag(self, video_tag: impl Into<&'static str>) -> Self

Source§

impl OpenGraphBuilder<VideoEpisode>

Source

pub fn video_actor(self, video_actor: Url) -> Self

Source

pub fn video_actor_role(self, video_actor_role: impl Into<&'static str>) -> Self

Source

pub fn video_director(self, video_director: Url) -> Self

Source

pub fn video_writer(self, video_writer: Url) -> Self

Source

pub fn video_duration(self, video_duration: isize) -> Self

Source

pub fn video_release_date(self, video_release_date: SystemTime) -> Self

Source

pub fn video_release_date_chrono( self, video_release_date: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn video_tag(self, video_tag: impl Into<&'static str>) -> Self

Source

pub fn video_series(self, video_series: Url) -> Self

Source§

impl OpenGraphBuilder<VideoTvShow>

Source

pub fn video_actor(self, video_actor: Url) -> Self

Source

pub fn video_actor_role(self, video_actor_role: impl Into<&'static str>) -> Self

Source

pub fn video_director(self, video_director: Url) -> Self

Source

pub fn video_writer(self, video_writer: Url) -> Self

Source

pub fn video_duration(self, video_duration: isize) -> Self

Source

pub fn video_release_date_chrono( self, video_release_date: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn video_tag(self, video_tag: impl Into<&'static str>) -> Self

Source§

impl OpenGraphBuilder<VideoOther>

Source

pub fn video_actor(self, video_actor: Url) -> Self

Source

pub fn video_actor_role(self, video_actor_role: impl Into<&'static str>) -> Self

Source

pub fn video_director(self, video_director: Url) -> Self

Source

pub fn video_writer(self, video_writer: Url) -> Self

Source

pub fn video_duration(self, video_duration: isize) -> Self

Source

pub fn video_release_date(self, video_release_date: SystemTime) -> Self

Source

pub fn video_release_date_chrono( self, video_release_date: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn video_tag(self, video_tag: impl Into<&'static str>) -> Self

Source§

impl OpenGraphBuilder<Article>

Source

pub fn article_published_time(self, article_published_time: SystemTime) -> Self

Source

pub fn article_published_time_chrono( self, article_published_time: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn article_modified_time(self, article_modified_time: SystemTime) -> Self

Source

pub fn article_modified_time_chrono( self, article_modified_time: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn article_expiration_time( self, article_expiration_time: SystemTime, ) -> Self

Source

pub fn article_expiration_time_chrono( self, article_expiration_time: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn article_author(self, article_author: Url) -> Self

Source

pub fn article_section(self, article_section: impl Into<&'static str>) -> Self

Source

pub fn article_tag(self, article_tag: impl Into<&'static str>) -> Self

Source§

impl OpenGraphBuilder<Book>

Source

pub fn book_author(self, book_author: Url) -> Self

Source

pub fn book_isbn(self, book_isbn: impl Into<&'static str>) -> Self

Source

pub fn book_release_date(self, book_release_date: SystemTime) -> Self

Source

pub fn book_release_data_chrono( self, book_release_date: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn book_tag(self, book_tag: impl Into<&'static str>) -> Self

Source§

impl OpenGraphBuilder<PaymentLink>

Source

pub fn payment_description( self, payment_description: impl Into<&'static str>, ) -> Self

Source

pub fn payment_currency(self, payment_currency: impl Into<&'static str>) -> Self

Source

pub fn payment_amount(self, payment_amount: impl Into<f64>) -> Self

Source

pub fn payment_expires_at_chrono( self, payment_expires_at: impl Into<DateTime<Utc>>, ) -> Self

Available on crate feature chrono only.
Source

pub fn payment_status(self, payment_status: PaymentStatus) -> Self

Source

pub fn payment_id(self, payment_id: impl Into<&'static str>) -> Self

Source

pub fn payment_success_url(self, payment_success_url: Url) -> Self

Source§

impl OpenGraphBuilder<Profile>

Source

pub fn profile_first_name( self, profile_first_name: impl Into<&'static str>, ) -> Self

Source

pub fn profile_last_name( self, profile_last_name: impl Into<&'static str>, ) -> Self

Source

pub fn profile_username(self, profile_username: impl Into<&'static str>) -> Self

Source

pub fn profile_gender(self, profile_gender: Gender) -> Self

Trait Implementations§

Source§

impl<M: Debug + OpenGraphTypeMarker> Debug for OpenGraphBuilder<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M: OpenGraphTypeMarker> Into<OpenGraph> for OpenGraphBuilder<M>

Source§

fn into(self) -> OpenGraph

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

§

impl<M> Freeze for OpenGraphBuilder<M>

§

impl<M> RefUnwindSafe for OpenGraphBuilder<M>
where M: RefUnwindSafe,

§

impl<M> Send for OpenGraphBuilder<M>

§

impl<M> Sync for OpenGraphBuilder<M>

§

impl<M> Unpin for OpenGraphBuilder<M>
where M: Unpin,

§

impl<M> UnwindSafe for OpenGraphBuilder<M>
where M: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.