pub struct Link { /* private fields */ }Expand description
Link preview message. Use with_title, with_description, and with_image to populate
the Open Graph-style card shown to the recipient.
Implementations§
Source§impl Link
impl Link
pub fn new(uri: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_image(self, image: ImagePreview) -> Self
pub fn with_content(self, content: LinkContent) -> Self
pub fn with_text(self, text: impl Into<String>) -> Self
Trait Implementations§
Source§impl MessageLike for Link
impl MessageLike for Link
type Kind = PreviewableKind
fn into_builder_parts(self) -> (ComposedMessage, PreviewableKind)
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
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,
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