pub struct RelayInformationDocumentV2 {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<RelayLimitationV2>,
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<RelayLimitationV2>
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 RelayInformationDocumentV2
impl RelayInformationDocumentV2
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 RelayInformationDocumentV2
impl Clone for RelayInformationDocumentV2
source§fn clone(&self) -> RelayInformationDocumentV2
fn clone(&self) -> RelayInformationDocumentV2
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 RelayInformationDocumentV2
impl Debug for RelayInformationDocumentV2
source§impl Default for RelayInformationDocumentV2
impl Default for RelayInformationDocumentV2
source§fn default() -> RelayInformationDocumentV2
fn default() -> RelayInformationDocumentV2
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RelayInformationDocumentV2
impl<'de> Deserialize<'de> for RelayInformationDocumentV2
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 RelayInformationDocumentV2
impl Display for RelayInformationDocumentV2
impl Eq for RelayInformationDocumentV2
impl StructuralPartialEq for RelayInformationDocumentV2
Auto Trait Implementations§
impl Freeze for RelayInformationDocumentV2
impl RefUnwindSafe for RelayInformationDocumentV2
impl Send for RelayInformationDocumentV2
impl Sync for RelayInformationDocumentV2
impl Unpin for RelayInformationDocumentV2
impl UnwindSafe for RelayInformationDocumentV2
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
)