pub struct TunnelGuard(/* private fields */);
Implementations§
Source§impl TunnelGuard
impl TunnelGuard
Methods from Deref<Target = TunnelContainer>§
pub fn mtu(&self) -> usize
pub fn config(&self) -> &Config
pub fn stack(&self) -> Stack
pub fn remote(&self) -> &DeviceId
pub fn remote_const(&self) -> &DeviceDesc
pub fn protocol_version(&self) -> u8
pub fn stack_version(&self) -> u32
pub fn default_tunnel(&self) -> BuckyResult<DynamicTunnel>
pub fn default_udp_tunnel(&self) -> BuckyResult<Tunnel>
pub fn send_packages( &self, packages: Vec<DynamicPackage>, ) -> Result<(), BuckyError>
pub fn send_package( &self, package: DynamicPackage, plaintext: bool, ) -> BuckyResult<()>
pub fn build_send( &self, package: DynamicPackage, build_params: BuildTunnelParams, plaintext: bool, ) -> BuckyResult<()>
pub fn state(&self) -> TunnelState
pub async fn wait_active(&self) -> TunnelState
pub fn tunnel_of<T: 'static + Tunnel + Clone>( &self, ep_pair: &EndpointPair, ) -> Option<T>
pub fn create_tunnel<T: 'static + Tunnel + Clone>( &self, ep_pair: EndpointPair, proxy: ProxyType, ) -> BuckyResult<(T, bool)>
pub fn reset(&self)
Trait Implementations§
Source§impl AsRef<TunnelContainer> for TunnelGuard
impl AsRef<TunnelContainer> for TunnelGuard
Source§fn as_ref(&self) -> &TunnelContainer
fn as_ref(&self) -> &TunnelContainer
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for TunnelGuard
impl Clone for TunnelGuard
Source§fn clone(&self) -> TunnelGuard
fn clone(&self) -> TunnelGuard
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 Deref for TunnelGuard
impl Deref for TunnelGuard
Source§type Target = TunnelContainer
type Target = TunnelContainer
The resulting type after dereferencing.
Source§fn deref(&self) -> &TunnelContainer
fn deref(&self) -> &TunnelContainer
Dereferences the value.
Auto Trait Implementations§
impl Freeze for TunnelGuard
impl !RefUnwindSafe for TunnelGuard
impl Send for TunnelGuard
impl Sync for TunnelGuard
impl Unpin for TunnelGuard
impl !UnwindSafe for TunnelGuard
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<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