pub struct PackAddress {
pub kind: u16,
pub pubkey: PublicKey,
pub identifier: String,
}Expand description
Parsed NIP-19 / NIP-51 set address.
Fields§
§kind: u16§pubkey: PublicKey§identifier: StringImplementations§
Source§impl PackAddress
impl PackAddress
Sourcepub fn to_addr_string(&self) -> String
pub fn to_addr_string(&self) -> String
Serialise back to the wire form used in kind 10030 a tags.
parse_pack_address is the only constructor and it rejects any
kind ≠ KIND_EMOJI_SET, so we can route through the optimised
build_pack_addr and skip format! entirely.
Trait Implementations§
Source§impl Clone for PackAddress
impl Clone for PackAddress
Source§fn clone(&self) -> PackAddress
fn clone(&self) -> PackAddress
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 Debug for PackAddress
impl Debug for PackAddress
Source§impl PartialEq for PackAddress
impl PartialEq for PackAddress
impl StructuralPartialEq for PackAddress
Auto Trait Implementations§
impl Freeze for PackAddress
impl RefUnwindSafe for PackAddress
impl Send for PackAddress
impl Sync for PackAddress
impl Unpin for PackAddress
impl UnsafeUnpin for PackAddress
impl UnwindSafe for PackAddress
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