pub struct Embed {Show 18 fields
pub class: &'static str,
pub kind: u16,
pub id: String,
pub author: String,
pub created_at: u64,
pub published_at: Option<u64>,
pub title: Option<String>,
pub summary: Option<String>,
pub image: Option<String>,
pub text: String,
pub media: Vec<EmbedMedia>,
pub video: Option<EmbedMedia>,
pub link: Option<String>,
pub content_warning: Option<String>,
pub emoji: Vec<EmojiTag>,
pub bech32: String,
pub reposted_by: Option<String>,
pub reply_to: Option<ReplyTo>,
}Expand description
One referenced event, shaped for its card.
Fields§
§class: &'static str“post”, “article”, “video” or “short”.
kind: u16§id: String§created_at: u64§published_at: Option<u64>§title: Option<String>§summary: Option<String>§image: Option<String>Article cover or video poster.
text: StringA post’s text without its media links, an article’s markdown, or a video’s description.
media: Vec<EmbedMedia>§video: Option<EmbedMedia>§link: Option<String>A video event’s page when it names no file that can be fetched (a YouTube link).
content_warning: Option<String>§emoji: Vec<EmojiTag>NIP-30 custom emoji the text’s :shortcode:s name.
bech32: StringThe canonical nevent/naddr, relay hints included, for copying.
reposted_by: Option<String>Who reposted it, when the reference named a repost (NIP-18).
reply_to: Option<ReplyTo>What a comment answers (NIP-22).
Trait Implementations§
Auto Trait Implementations§
impl Forget for Embed
impl Freeze for Embed
impl Move for Embed
impl RefUnwindSafe for Embed
impl Send for Embed
impl Sync for Embed
impl Unpin for Embed
impl UnsafeUnpin for Embed
impl UnwindSafe for Embed
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> 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