pub struct MetadataV1 {
pub name: Option<String>,
pub about: Option<String>,
pub picture: Option<String>,
pub nip05: Option<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
other: Map<String, Value>
Additional fields not specified in NIP-01 or NIP-05
Implementations§
source§impl MetadataV1
impl MetadataV1
Trait Implementations§
source§impl Clone for MetadataV1
impl Clone for MetadataV1
source§fn clone(&self) -> MetadataV1
fn clone(&self) -> MetadataV1
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 MetadataV1
impl Debug for MetadataV1
source§impl Default for MetadataV1
impl Default for MetadataV1
source§impl<'de> Deserialize<'de> for MetadataV1
impl<'de> Deserialize<'de> for MetadataV1
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 MetadataV1
impl PartialEq for MetadataV1
source§impl Serialize for MetadataV1
impl Serialize for MetadataV1
impl Eq for MetadataV1
impl StructuralPartialEq for MetadataV1
Auto Trait Implementations§
impl Freeze for MetadataV1
impl RefUnwindSafe for MetadataV1
impl Send for MetadataV1
impl Sync for MetadataV1
impl Unpin for MetadataV1
impl UnwindSafe for MetadataV1
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
)