Struct nostr_sdk::nips::nip46::NostrConnectMetadata
source · pub struct NostrConnectMetadata {
pub name: String,
pub url: Option<Url>,
pub description: Option<String>,
pub icons: Option<Vec<Url, Global>>,
}
Expand description
Nostr Connect Metadata
Fields§
§name: String
Human-readable name of the App
url: Option<Url>
URL of the website requesting the connection
description: Option<String>
Description of the App
icons: Option<Vec<Url, Global>>
Array of URLs for icons of the App
Implementations§
source§impl NostrConnectMetadata
impl NostrConnectMetadata
sourcepub fn new<S>(name: S) -> NostrConnectMetadatawhere
S: Into<String>,
pub fn new<S>(name: S) -> NostrConnectMetadatawhere S: Into<String>,
New Nostr Connect Metadata
sourcepub fn url(self, url: Url) -> NostrConnectMetadata
pub fn url(self, url: Url) -> NostrConnectMetadata
Set url
sourcepub fn description<S>(self, description: S) -> NostrConnectMetadatawhere
S: Into<String>,
pub fn description<S>(self, description: S) -> NostrConnectMetadatawhere S: Into<String>,
Set description
Trait Implementations§
source§impl Clone for NostrConnectMetadata
impl Clone for NostrConnectMetadata
source§fn clone(&self) -> NostrConnectMetadata
fn clone(&self) -> NostrConnectMetadata
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 NostrConnectMetadata
impl Debug for NostrConnectMetadata
source§impl<'de> Deserialize<'de> for NostrConnectMetadata
impl<'de> Deserialize<'de> for NostrConnectMetadata
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<NostrConnectMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<NostrConnectMetadata, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for NostrConnectMetadata
impl Hash for NostrConnectMetadata
source§impl Ord for NostrConnectMetadata
impl Ord for NostrConnectMetadata
source§fn cmp(&self, other: &NostrConnectMetadata) -> Ordering
fn cmp(&self, other: &NostrConnectMetadata) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<NostrConnectMetadata> for NostrConnectMetadata
impl PartialEq<NostrConnectMetadata> for NostrConnectMetadata
source§fn eq(&self, other: &NostrConnectMetadata) -> bool
fn eq(&self, other: &NostrConnectMetadata) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<NostrConnectMetadata> for NostrConnectMetadata
impl PartialOrd<NostrConnectMetadata> for NostrConnectMetadata
source§fn partial_cmp(&self, other: &NostrConnectMetadata) -> Option<Ordering>
fn partial_cmp(&self, other: &NostrConnectMetadata) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for NostrConnectMetadata
impl Serialize for NostrConnectMetadata
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for NostrConnectMetadata
impl StructuralEq for NostrConnectMetadata
impl StructuralPartialEq for NostrConnectMetadata
Auto Trait Implementations§
impl RefUnwindSafe for NostrConnectMetadata
impl Send for NostrConnectMetadata
impl Sync for NostrConnectMetadata
impl Unpin for NostrConnectMetadata
impl UnwindSafe for NostrConnectMetadata
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.