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