pub struct RelayInfo {
pub fingerprint: String,
pub nickname: Option<String>,
}Expand description
Information about a relay in a circuit path.
Each hop in a Tor circuit is represented by a RelayInfo containing
the relay’s fingerprint and optionally its nickname. The fingerprint
is a 40-character hexadecimal string representing the SHA-1 hash of
the relay’s identity key.
§Fields
fingerprint: The relay’s identity fingerprint (40 hex characters)nickname: The relay’s optional human-readable nickname
§Example
use stem_rs::controller::RelayInfo;
let relay = RelayInfo {
fingerprint: "9695DFC35FFEB861329B9F1AB04C46397020CE31".to_string(),
nickname: Some("MyRelay".to_string()),
};
println!("Relay: {} ({:?})", relay.fingerprint, relay.nickname);§See Also
Circuit: Contains a path ofRelayInfoentriesutil::is_valid_fingerprint: Validate fingerprint format
Fields§
§fingerprint: StringThe relay’s identity fingerprint (40 hexadecimal characters).
This is the SHA-1 hash of the relay’s identity key, used to uniquely identify relays across the Tor network.
nickname: Option<String>The relay’s optional human-readable nickname.
Nicknames are chosen by relay operators and are not guaranteed to be
unique. May be None if the nickname was not provided in the circuit
status response.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RelayInfo
impl RefUnwindSafe for RelayInfo
impl Send for RelayInfo
impl Sync for RelayInfo
impl Unpin for RelayInfo
impl UnwindSafe for RelayInfo
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