pub struct Metadata {
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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
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
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
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