Struct nostr_sdk::nips::nip11::RelayInformationDocument
source · pub struct RelayInformationDocument {
pub name: Option<String>,
pub description: Option<String>,
pub pubkey: Option<String>,
pub contact: Option<String>,
pub supported_nips: Option<Vec<u16, Global>>,
pub software: Option<String>,
pub version: Option<String>,
}
Expand description
Relay information document
Fields§
§name: Option<String>
Name
description: Option<String>
Description
pubkey: Option<String>
Owner public key
contact: Option<String>
Owner contact
supported_nips: Option<Vec<u16, Global>>
Supported NIPs
software: Option<String>
Software
version: Option<String>
Software version
Implementations§
source§impl RelayInformationDocument
impl RelayInformationDocument
sourcepub fn new() -> RelayInformationDocument
pub fn new() -> RelayInformationDocument
Create new empty RelayInformationDocument
sourcepub async fn get(
url: Url,
proxy: Option<SocketAddr>
) -> impl Future<Output = Result<RelayInformationDocument, Error>>
pub async fn get( url: Url, proxy: Option<SocketAddr> ) -> impl Future<Output = Result<RelayInformationDocument, Error>>
Get Relay Information Document
sourcepub fn get_blocking(
url: Url,
proxy: Option<SocketAddr>
) -> Result<RelayInformationDocument, Error>
pub fn get_blocking( url: Url, proxy: Option<SocketAddr> ) -> Result<RelayInformationDocument, Error>
Get Relay Information Document
Trait Implementations§
source§impl Clone for RelayInformationDocument
impl Clone for RelayInformationDocument
source§fn clone(&self) -> RelayInformationDocument
fn clone(&self) -> RelayInformationDocument
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 RelayInformationDocument
impl Debug for RelayInformationDocument
source§impl Default for RelayInformationDocument
impl Default for RelayInformationDocument
source§fn default() -> RelayInformationDocument
fn default() -> RelayInformationDocument
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RelayInformationDocument
impl<'de> Deserialize<'de> for RelayInformationDocument
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RelayInformationDocument, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<RelayInformationDocument, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for RelayInformationDocument
impl Hash for RelayInformationDocument
source§impl Ord for RelayInformationDocument
impl Ord for RelayInformationDocument
source§fn cmp(&self, other: &RelayInformationDocument) -> Ordering
fn cmp(&self, other: &RelayInformationDocument) -> 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<RelayInformationDocument> for RelayInformationDocument
impl PartialEq<RelayInformationDocument> for RelayInformationDocument
source§fn eq(&self, other: &RelayInformationDocument) -> bool
fn eq(&self, other: &RelayInformationDocument) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RelayInformationDocument> for RelayInformationDocument
impl PartialOrd<RelayInformationDocument> for RelayInformationDocument
source§fn partial_cmp(&self, other: &RelayInformationDocument) -> Option<Ordering>
fn partial_cmp(&self, other: &RelayInformationDocument) -> 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 RelayInformationDocument
impl Serialize for RelayInformationDocument
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 RelayInformationDocument
impl StructuralEq for RelayInformationDocument
impl StructuralPartialEq for RelayInformationDocument
Auto Trait Implementations§
impl RefUnwindSafe for RelayInformationDocument
impl Send for RelayInformationDocument
impl Sync for RelayInformationDocument
impl Unpin for RelayInformationDocument
impl UnwindSafe for RelayInformationDocument
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.