pub struct RelayMonitor {
pub frequency_seconds: Option<u64>,
pub timeouts: Vec<MonitorTimeout>,
pub checks: Vec<String>,
pub geohash: Option<String>,
pub extra_tags: Vec<Tag>,
}Expand description
Typed bundle for a kind: 10166 relay monitor announcement.
Fields§
§frequency_seconds: Option<u64>frequency — seconds between successive 30166 publications.
timeouts: Vec<MonitorTimeout>timeout rows.
checks: Vec<String>c — lowercase check names (open, read, write, …).
geohash: Option<String>g — geohash.
Forward-compatible passthrough for unknown tags.
Implementations§
Source§impl RelayMonitor
impl RelayMonitor
Sourcepub const fn frequency_seconds(self, seconds: u64) -> Self
pub const fn frequency_seconds(self, seconds: u64) -> Self
Sourcepub fn timeout(self, timeout: MonitorTimeout) -> Self
pub fn timeout(self, timeout: MonitorTimeout) -> Self
Append a timeout row.
Sourcepub fn geohash(self, geohash: impl Into<String>) -> Self
pub fn geohash(self, geohash: impl Into<String>) -> Self
Set Self::geohash.
Sourcepub fn from_event(event: &Event) -> Result<Self, RelayDiscoveryError>
pub fn from_event(event: &Event) -> Result<Self, RelayDiscoveryError>
Parse a kind: 10166 event into a typed bundle.
§Errors
RelayDiscoveryError::WrongKindfor non-10166 events.- Field-specific errors for malformed columns.
Trait Implementations§
Source§impl Clone for RelayMonitor
impl Clone for RelayMonitor
Source§fn clone(&self) -> RelayMonitor
fn clone(&self) -> RelayMonitor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RelayMonitor
impl Debug for RelayMonitor
Source§impl Default for RelayMonitor
impl Default for RelayMonitor
Source§fn default() -> RelayMonitor
fn default() -> RelayMonitor
Returns the “default value” for a type. Read more
impl Eq for RelayMonitor
Source§impl PartialEq for RelayMonitor
impl PartialEq for RelayMonitor
impl StructuralPartialEq for RelayMonitor
Auto Trait Implementations§
impl Freeze for RelayMonitor
impl RefUnwindSafe for RelayMonitor
impl Send for RelayMonitor
impl Sync for RelayMonitor
impl Unpin for RelayMonitor
impl UnsafeUnpin for RelayMonitor
impl UnwindSafe for RelayMonitor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.