pub struct MetadataV2 {
pub name: Option<String>,
pub about: Option<String>,
pub picture: Option<String>,
pub nip05: Option<String>,
pub fields: Vec<(String, String)>,
pub other: Map<String, Value>,
}
Expand description
Metadata about a user
Note: the value is an Option because some real-world data has been found to contain JSON nulls as values, and we don’t want deserialization of those events to fail. We treat these in our get() function the same as if the key did not exist.
Fields§
§name: Option<String>
username
about: Option<String>
about
picture: Option<String>
picture URL
nip05: Option<String>
nip05 dns id
fields: Vec<(String, String)>
fields
other: Map<String, Value>
Additional fields not specified in NIP-01 or NIP-05
Implementations§
source§impl MetadataV2
impl MetadataV2
Trait Implementations§
source§impl Clone for MetadataV2
impl Clone for MetadataV2
source§fn clone(&self) -> MetadataV2
fn clone(&self) -> MetadataV2
Returns a copy of the value. Read more
1.0.0 · 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 MetadataV2
impl Debug for MetadataV2
source§impl Default for MetadataV2
impl Default for MetadataV2
source§impl<'de> Deserialize<'de> for MetadataV2
impl<'de> Deserialize<'de> for MetadataV2
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for MetadataV2
impl PartialEq for MetadataV2
source§impl Serialize for MetadataV2
impl Serialize for MetadataV2
impl Eq for MetadataV2
impl StructuralPartialEq for MetadataV2
Auto Trait Implementations§
impl Freeze for MetadataV2
impl RefUnwindSafe for MetadataV2
impl Send for MetadataV2
impl Sync for MetadataV2
impl Unpin for MetadataV2
impl UnwindSafe for MetadataV2
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)