pub struct NostrNoteView<'a> {
pub pubkey: Cow<'a, str>,
pub created_at: i64,
pub kind: u32,
pub tags: TagsView<'a>,
pub content: Cow<'a, str>,
pub id: Option<Cow<'a, str>>,
pub sig: Option<Cow<'a, str>>,
}Fields§
§pubkey: Cow<'a, str>§created_at: i64§kind: u32§content: Cow<'a, str>§id: Option<Cow<'a, str>>§sig: Option<Cow<'a, str>>Trait Implementations§
Source§impl<'a> Clone for NostrNoteView<'a>
impl<'a> Clone for NostrNoteView<'a>
Source§fn clone(&self) -> NostrNoteView<'a>
fn clone(&self) -> NostrNoteView<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for NostrNoteView<'a>
impl<'a> Debug for NostrNoteView<'a>
impl<'a> Eq for NostrNoteView<'a>
Source§impl<'input> FromJson<'input> for NostrNoteView<'input>
impl<'input> FromJson<'input> for NostrNoteView<'input>
Source§impl NostrEvent for NostrNoteView<'_>
impl NostrEvent for NostrNoteView<'_>
fn pubkey_str(&self) -> Cow<'_, str>
fn created_at(&self) -> i64
fn kind(&self) -> u32
fn content_str(&self) -> Cow<'_, str>
fn id_hex(&self) -> Option<Cow<'_, str>>
fn sig_hex(&self) -> Option<Cow<'_, str>>
Write the event’s tag rows as a JSON array to
sink. Read morefn id_bytes(&self) -> Option<[u8; 32]>
fn sig_bytes(&self) -> Option<[u8; 64]>
fn pubkey_bytes(&self) -> Option<[u8; 32]>
Source§fn compute_id_bytes(&self) -> [u8; 32]
fn compute_id_bytes(&self) -> [u8; 32]
SHA-256 of the NIP-01 canonical serialization
[0, pubkey, created_at, kind, tags, content].fn verify_content(&self) -> bool
Source§impl<'a> PartialEq for NostrNoteView<'a>
impl<'a> PartialEq for NostrNoteView<'a>
impl<'a> StructuralPartialEq for NostrNoteView<'a>
Auto Trait Implementations§
impl<'a> Freeze for NostrNoteView<'a>
impl<'a> RefUnwindSafe for NostrNoteView<'a>
impl<'a> Send for NostrNoteView<'a>
impl<'a> Sync for NostrNoteView<'a>
impl<'a> Unpin for NostrNoteView<'a>
impl<'a> UnsafeUnpin for NostrNoteView<'a>
impl<'a> UnwindSafe for NostrNoteView<'a>
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