pub struct Table<I: IpExt, E, BT: FilterBindingsTypes> { /* private fields */ }
Expand description
Implements a connection tracking subsystem.
The E
parameter is for external data that is stored in the [Connection
]
struct and can be extracted with the [Connection::external_data()
]
function.
Implementations§
Source§impl<I: IpExt, E, BT: FilterBindingsTypes> Table<I, E, BT>
impl<I: IpExt, E, BT: FilterBindingsTypes> Table<I, E, BT>
Sourcepub fn contains_tuple(&self, tuple: &Tuple<I>) -> bool
pub fn contains_tuple(&self, tuple: &Tuple<I>) -> bool
Returns whether the table contains a connection for the specified tuple.
This is for NAT to determine whether a generated tuple will clash with one already in the map. While it might seem inefficient, to require locking in a loop, taking an uncontested lock is going to be significantly faster than the RNG used to allocate NAT parameters.
Sourcepub fn get_connection(&self, tuple: &Tuple<I>) -> Option<Connection<I, E, BT>>
pub fn get_connection(&self, tuple: &Tuple<I>) -> Option<Connection<I, E, BT>>
Returns a [Connection
] for the flow indexed by tuple
, if one exists.
Trait Implementations§
Source§impl<I: IpExt, E: Inspectable, BT: FilterBindingsTypes> Inspectable for Table<I, E, BT>
impl<I: IpExt, E: Inspectable, BT: FilterBindingsTypes> Inspectable for Table<I, E, BT>
Source§fn record<Inspector: Inspector>(&self, inspector: &mut Inspector)
fn record<Inspector: Inspector>(&self, inspector: &mut Inspector)
Records this value into
inspector
.Auto Trait Implementations§
impl<I, E, BT> !Freeze for Table<I, E, BT>
impl<I, E, BT> RefUnwindSafe for Table<I, E, BT>
impl<I, E, BT> Send for Table<I, E, BT>
impl<I, E, BT> Sync for Table<I, E, BT>
impl<I, E, BT> Unpin for Table<I, E, BT>
impl<I, E, BT> UnwindSafe for Table<I, E, BT>
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more