Struct nostr_types::RelayInformationDocumentV1
source · pub struct RelayInformationDocumentV1 {Show 16 fields
pub name: Option<String>,
pub description: Option<String>,
pub pubkey: Option<PublicKeyHex>,
pub contact: Option<String>,
pub supported_nips: Vec<u32>,
pub software: Option<String>,
pub version: Option<String>,
pub limitation: Option<RelayLimitationV1>,
pub retention: Vec<RelayRetentionV1>,
pub relay_countries: Vec<String>,
pub language_tags: Vec<String>,
pub tags: Vec<String>,
pub posting_policy: Option<Url>,
pub payments_url: Option<Url>,
pub fees: Option<RelayFeesV1>,
pub other: Map<String, Value>,
}
Expand description
Relay information document as described in NIP-11, supplied by a relay
Fields§
§name: Option<String>
Name of the relay
description: Option<String>
Description of the relay in plain text
pubkey: Option<PublicKeyHex>
Public key of an administrative contact of the relay
contact: Option<String>
An administrative contact for the relay. Should be a URI.
supported_nips: Vec<u32>
A list of NIPs supported by the relay
software: Option<String>
The software running the relay
version: Option<String>
The software version
limitation: Option<RelayLimitationV1>
limitation
retention: Vec<RelayRetentionV1>
retention
relay_countries: Vec<String>
content limitation: relay countries
community preferences: language tags
community preferences: tags
posting_policy: Option<Url>
community preferences: posting policy
payments_url: Option<Url>
payments_url
fees: Option<RelayFeesV1>
fees
other: Map<String, Value>
Additional fields not specified in NIP-11
Implementations§
source§impl RelayInformationDocumentV1
impl RelayInformationDocumentV1
sourcepub fn supports_nip(&self, nip: u32) -> bool
pub fn supports_nip(&self, nip: u32) -> bool
If the relay supports the queried nip
Trait Implementations§
source§impl Clone for RelayInformationDocumentV1
impl Clone for RelayInformationDocumentV1
source§fn clone(&self) -> RelayInformationDocumentV1
fn clone(&self) -> RelayInformationDocumentV1
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 RelayInformationDocumentV1
impl Debug for RelayInformationDocumentV1
source§impl Default for RelayInformationDocumentV1
impl Default for RelayInformationDocumentV1
source§fn default() -> RelayInformationDocumentV1
fn default() -> RelayInformationDocumentV1
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RelayInformationDocumentV1
impl<'de> Deserialize<'de> for RelayInformationDocumentV1
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 Display for RelayInformationDocumentV1
impl Display for RelayInformationDocumentV1
source§impl PartialEq for RelayInformationDocumentV1
impl PartialEq for RelayInformationDocumentV1
source§fn eq(&self, other: &RelayInformationDocumentV1) -> bool
fn eq(&self, other: &RelayInformationDocumentV1) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for RelayInformationDocumentV1
impl StructuralPartialEq for RelayInformationDocumentV1
Auto Trait Implementations§
impl Freeze for RelayInformationDocumentV1
impl RefUnwindSafe for RelayInformationDocumentV1
impl Send for RelayInformationDocumentV1
impl Sync for RelayInformationDocumentV1
impl Unpin for RelayInformationDocumentV1
impl UnwindSafe for RelayInformationDocumentV1
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