pub struct TapBuilder<E: Engine = LinearEngine> { /* private fields */ }Expand description
Builder for a Tap.
Implementations§
Source§impl<E: Engine> TapBuilder<E>
impl<E: Engine> TapBuilder<E>
Sourcepub fn new<I>(interface: I) -> Self
pub fn new<I>(interface: I) -> Self
Creates a new TapBuilder from the given interface name or number.
Sourcepub fn copy_config(self, copy_config: CopyConfig) -> Self
pub fn copy_config(self, copy_config: CopyConfig) -> Self
Set the CopyConfig.
Sourcepub fn route_config(self, route_config: RouteConfig) -> Self
pub fn route_config(self, route_config: RouteConfig) -> Self
Set the RouteConfig.
Sourcepub fn build(self) -> Result<Tap<E>, Error>
pub fn build(self) -> Result<Tap<E>, Error>
Builds the Tap.
§Errors
Returns Error::BuilderRule if a rule builder fails to build.
Returns Error::InvalidInterfaceName or Error::InvalidInterfaceIndex if the interface
provided is invalid.
Returns Error::InvalidFrameKind if the interface does not use Eth or IP frames.
May return additional Errors if the eBPF programs fail to load or attach.
Auto Trait Implementations§
impl<E> Freeze for TapBuilder<E>
impl<E = LinearEngine> !RefUnwindSafe for TapBuilder<E>
impl<E> Send for TapBuilder<E>where
E: Send,
impl<E> Sync for TapBuilder<E>where
E: Sync,
impl<E> Unpin for TapBuilder<E>where
E: Unpin,
impl<E> UnsafeUnpin for TapBuilder<E>
impl<E = LinearEngine> !UnwindSafe for TapBuilder<E>
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