pub struct TunnelContainer(/* private fields */);
Implementations§
Source§impl TunnelContainer
impl 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 TunnelContainer
impl Clone for TunnelContainer
Source§fn clone(&self) -> TunnelContainer
fn clone(&self) -> TunnelContainer
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 Display for TunnelContainer
impl Display for TunnelContainer
Source§impl TunnelOwner for TunnelContainer
impl TunnelOwner for TunnelContainer
fn sync_tunnel_state( &self, tunnel: &DynamicTunnel, former_state: TunnelState, new_state: TunnelState, )
fn clone_as_tunnel_owner(&self) -> Box<dyn TunnelOwner>
Auto Trait Implementations§
impl Freeze for TunnelContainer
impl !RefUnwindSafe for TunnelContainer
impl Send for TunnelContainer
impl Sync for TunnelContainer
impl Unpin for TunnelContainer
impl !UnwindSafe for TunnelContainer
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