pub struct RustSlirp { /* private fields */ }Expand description
User-mode networking for unprivileged network namespaces.
Creates a TUN/TAP device in the new NETWORK namespace, and returns the tapfd to the caller. This allows the caller to manage packets / do filtering explicitly.
Implementations§
Source§impl RustSlirp
impl RustSlirp
Sourcepub fn mode(&mut self, mode: RustSlirpMode) -> &mut Self
pub fn mode(&mut self, mode: RustSlirpMode) -> &mut Self
Creating a TUN(L3) or TAP (L2) interface.
Sourcepub fn destination(&mut self, destination: Ipv4Addr) -> &mut Self
pub fn destination(&mut self, destination: Ipv4Addr) -> &mut Self
Sets the destination.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RustSlirp
impl RefUnwindSafe for RustSlirp
impl Send for RustSlirp
impl Sync for RustSlirp
impl Unpin for RustSlirp
impl UnsafeUnpin for RustSlirp
impl UnwindSafe for RustSlirp
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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