pub struct RelayerNode {
pub address: String,
pub sphinx_key: String,
pub url: String,
pub stake: String,
pub last_seen: u64,
pub is_privileged: bool,
pub layer: u8,
pub role: u8,
pub ingress_url: Option<String>,
pub metadata_url: Option<String>,
}Fields§
§address: String§sphinx_key: String§url: StringP2P multiaddr (e.g., /ip4/1.2.3.4/tcp/9000)
stake: StringString to preserve U256 precision
last_seen: u64§is_privileged: bool§layer: u80=Entry, 1=Mix, 2=Exit
role: u81=Relay, 2=Exit, 3=Full. Defaults to 3 for backward compat.
ingress_url: Option<String>HTTPS ingress URL for client SDK packet submission. Separate from url (P2P multiaddr).
metadata_url: Option<String>Extended metadata JSON URL for version, region, capabilities, etc.
Implementations§
Source§impl RelayerNode
impl RelayerNode
pub fn new( address: String, sphinx_key: String, url: String, stake: String, role: u8, ) -> Self
pub fn with_ingress_url(self, ingress_url: String) -> Self
Sourcepub fn parse_stake(stake_str: &str) -> Option<u128>
pub fn parse_stake(stake_str: &str) -> Option<u128>
Parse stake string to u128 for numeric comparison.
pub fn stake_value(&self) -> u128
Trait Implementations§
Source§impl Clone for RelayerNode
impl Clone for RelayerNode
Source§fn clone(&self) -> RelayerNode
fn clone(&self) -> RelayerNode
Returns a duplicate 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 RelayerNode
impl Debug for RelayerNode
Source§impl<'de> Deserialize<'de> for RelayerNode
impl<'de> Deserialize<'de> for RelayerNode
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 PartialEq for RelayerNode
impl PartialEq for RelayerNode
Source§impl Serialize for RelayerNode
impl Serialize for RelayerNode
impl Eq for RelayerNode
impl StructuralPartialEq for RelayerNode
Auto Trait Implementations§
impl Freeze for RelayerNode
impl RefUnwindSafe for RelayerNode
impl Send for RelayerNode
impl Sync for RelayerNode
impl Unpin for RelayerNode
impl UnsafeUnpin for RelayerNode
impl UnwindSafe for RelayerNode
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more