pub struct TorManager { /* private fields */ }Expand description
Tor network manager
Implementations§
Source§impl TorManager
impl TorManager
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if Tor is running
Sourcepub async fn create_circuit(&self) -> Result<CircuitId>
pub async fn create_circuit(&self) -> Result<CircuitId>
Create a new Tor circuit
Sourcepub async fn connect(&self, address: &str) -> Result<StreamId>
pub async fn connect(&self, address: &str) -> Result<StreamId>
Connect to an address through Tor
Create a hidden service
Remove a hidden service
Sourcepub fn close_stream(&self, stream_id: StreamId) -> Result<()>
pub fn close_stream(&self, stream_id: StreamId) -> Result<()>
Close a stream
Sourcepub fn get_circuit(&self, circuit_id: CircuitId) -> Option<CircuitInfo>
pub fn get_circuit(&self, circuit_id: CircuitId) -> Option<CircuitInfo>
Get circuit information
Sourcepub fn get_circuits(&self) -> Vec<CircuitInfo>
pub fn get_circuits(&self) -> Vec<CircuitInfo>
Get all circuits
Get all hidden services
Sourcepub fn validate_onion_address(address: &str) -> bool
pub fn validate_onion_address(address: &str) -> bool
Validate an onion address
Auto Trait Implementations§
impl Freeze for TorManager
impl !RefUnwindSafe for TorManager
impl Send for TorManager
impl Sync for TorManager
impl Unpin for TorManager
impl !UnwindSafe for TorManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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