pub struct Tunnel(/* private fields */);Implementations§
Source§impl Tunnel
impl Tunnel
pub fn new( container: TunnelContainer, owner: Box<dyn TunnelOwner>, interface: Interface, remote: Endpoint, proxy: ProxyType, ) -> Self
pub fn try_update_key(&self, by_box: &PackageBox) -> Result<(), BuckyError>
pub fn active( &self, key: &MixAesKey, exchange: bool, remote_timestamp: Option<Timestamp>, ) -> BuckyResult<TunnelContainer>
pub fn send_box(&self, package_box: &PackageBox) -> Result<(), BuckyError>
pub fn raw_data_max_len() -> usize
pub fn raw_data_max_payload_len() -> usize
pub fn owner(&self) -> Option<TunnelContainer>
Trait Implementations§
Source§impl Tunnel for Tunnel
impl Tunnel for Tunnel
fn mtu(&self) -> usize
fn ptr_eq(&self, other: &DynamicTunnel) -> bool
fn as_any(&self) -> &dyn Any
fn local(&self) -> &Endpoint
fn remote(&self) -> &Endpoint
fn proxy(&self) -> ProxyType
fn state(&self) -> TunnelState
fn raw_data_header_len(&self) -> usize
fn send_raw_data(&self, data: &mut [u8]) -> Result<usize, BuckyError>
fn send_package(&self, package: DynamicPackage) -> Result<usize, BuckyError>
fn retain_keeper(&self)
fn release_keeper(&self)
fn reset(&self)
fn mark_dead(&self, former_state: TunnelState)
Auto Trait Implementations§
impl Freeze for Tunnel
impl RefUnwindSafe for Tunnel
impl Send for Tunnel
impl Sync for Tunnel
impl Unpin for Tunnel
impl UnwindSafe for Tunnel
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