pub struct Wrapper<T: NetworkTransport> {
transport: T,
source: u16,
destination: u16,
}Expand description
The wrapper data-link sub-layer over a network (TCP/UDP) transport.
Fields§
§transport: T§source: u16§destination: u16Implementations§
Source§impl<T: NetworkTransport> Wrapper<T>
impl<T: NetworkTransport> Wrapper<T>
Sourcepub fn new(transport: T, source: u16, destination: u16) -> Self
pub fn new(transport: T, source: u16, destination: u16) -> Self
Creates a wrapper layer that sends from source wPort to destination
wPort over transport.
Sourcepub fn transport_mut(&mut self) -> &mut T
pub fn transport_mut(&mut self) -> &mut T
Returns a mutable reference to the underlying transport.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the layer and returns the underlying transport.
Trait Implementations§
Source§impl<T: NetworkTransport> DataLinkLayer for Wrapper<T>
impl<T: NetworkTransport> DataLinkLayer for Wrapper<T>
Auto Trait Implementations§
impl<T> Freeze for Wrapper<T>where
T: Freeze,
impl<T> RefUnwindSafe for Wrapper<T>where
T: RefUnwindSafe,
impl<T> Send for Wrapper<T>where
T: Send,
impl<T> Sync for Wrapper<T>where
T: Sync,
impl<T> Unpin for Wrapper<T>where
T: Unpin,
impl<T> UnsafeUnpin for Wrapper<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Wrapper<T>where
T: UnwindSafe,
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