pub struct Twitter { /* private fields */ }Expand description
A Twitter/X card patch. Unset title/description/images fall back to the final Open Graph/document values. Explicit clears suppress their fallback.
Implementations§
Source§impl Twitter
impl Twitter
pub fn new() -> Twitter
pub fn card(self, card: TwitterCard) -> Twitter
pub fn title(self, value: impl Into<Cow<'static, str>>) -> Twitter
pub fn clear_title(self) -> Twitter
pub fn description(self, value: impl Into<Cow<'static, str>>) -> Twitter
pub fn clear_description(self) -> Twitter
pub fn site(self, value: impl Into<Cow<'static, str>>) -> Twitter
pub fn clear_site(self) -> Twitter
pub fn site_id(self, value: impl Into<Cow<'static, str>>) -> Twitter
pub fn clear_site_id(self) -> Twitter
pub fn creator(self, value: impl Into<Cow<'static, str>>) -> Twitter
pub fn clear_creator(self) -> Twitter
pub fn creator_id(self, value: impl Into<Cow<'static, str>>) -> Twitter
pub fn clear_creator_id(self) -> Twitter
pub fn image(self, image: HeadMedia) -> Twitter
pub fn clear_image(self) -> Twitter
Trait Implementations§
Auto Trait Implementations§
impl Forget for Twitter
impl Freeze for Twitter
impl Move for Twitter
impl RefUnwindSafe for Twitter
impl Send for Twitter
impl Sync for Twitter
impl Unpin for Twitter
impl UnsafeUnpin for Twitterwhere
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
impl UnwindSafe for Twitter
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more