pub struct ProtocolInfo {
pub protocol_version: u32,
pub tor_version: String,
pub auth_methods: Vec<String>,
pub cookie_file: Option<String>,
}Expand description
Protocol information returned by PROTOCOLINFO command.
Contains information about the Tor control protocol version, the Tor version, and available authentication methods.
§Example
use stem_rs::controller::Controller;
let mut controller = Controller::from_port("127.0.0.1:9051".parse()?).await?;
let info = controller.get_protocolinfo().await?;
println!("Tor version: {}", info.tor_version);
println!("Auth methods: {:?}", info.auth_methods);Fields§
§protocol_version: u32Protocol version (typically 1)
tor_version: StringTor version string
auth_methods: Vec<String>Available authentication methods
Path to cookie file (if cookie auth available)
Trait Implementations§
Source§impl Clone for ProtocolInfo
impl Clone for ProtocolInfo
Source§fn clone(&self) -> ProtocolInfo
fn clone(&self) -> ProtocolInfo
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 moreAuto Trait Implementations§
impl Freeze for ProtocolInfo
impl RefUnwindSafe for ProtocolInfo
impl Send for ProtocolInfo
impl Sync for ProtocolInfo
impl Unpin for ProtocolInfo
impl UnwindSafe for ProtocolInfo
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