pub struct Client<P: TunnelProvider> { /* private fields */ }Implementations§
Source§impl<P: TunnelProvider> Client<P>
impl<P: TunnelProvider> Client<P>
pub fn new(provider: Option<P>) -> Self
pub fn new_with_runtime(provider: Option<P>, handle: RuntimeHandle) -> Self
pub fn state(&self) -> State
pub fn update_origin_ip(&self)
pub fn update_exit_ip(&self)
pub fn update_state<F>(&self, f: F)
pub fn set_tunnel_provider(&mut self, provider: P)
pub fn provider(&self) -> Arc<Option<P>>
pub fn provider_state(&self) -> Option<P::State>
pub fn watch_state(&self) -> Receiver<State>
pub fn start_sdk(&mut self, config: Config) -> Result<Receiver<()>>
pub fn stop_sdk(&mut self) -> Result<()>
pub fn restart_sdk(&mut self) -> Result<Receiver<Result<TunnelInfo>>>
pub fn reroute( &mut self, config: Config, ) -> Result<Receiver<Result<TunnelInfo>>>
pub fn start_tunnel(&mut self) -> Result<Receiver<Result<TunnelInfo>>>
pub fn stop_tunnel(&mut self) -> Result<()>
pub fn is_offline(&self) -> bool
pub fn update_is_offline(&self)
pub fn sample_metrics(&self) -> Result<DetailedBandwidthSummary>
pub fn tokio_handle(&self) -> RuntimeHandle
pub fn spawn<F>(&self, future: F) -> JoinHandle<F::Output>
pub fn block_on<F: Future>(&self, future: F) -> F::Output
Trait Implementations§
Auto Trait Implementations§
impl<P> !Freeze for Client<P>
impl<P> !RefUnwindSafe for Client<P>
impl<P> Send for Client<P>
impl<P> Sync for Client<P>
impl<P> Unpin for Client<P>
impl<P> !UnwindSafe for Client<P>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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