pub struct FlowMap { /* private fields */ }
Expand description
Storage for flows
A Flow
is identified by a FlowID
.
Multiple FlowID
may point to the same flow (direct and reverse flow, for ex.).
Implementations§
Source§impl FlowMap
impl FlowMap
Sourcepub fn with_rng_seed(self, seed: u64) -> Self
pub fn with_rng_seed(self, seed: u64) -> Self
Use provided seed for the random number generator (flow IDs)
This option is intended for use in testing
pub fn lookup_flow(&self, five_t: &FiveTuple) -> Option<FlowID>
Sourcepub fn insert_flow(&mut self, five_t: FiveTuple, flow: Flow) -> FlowID
pub fn insert_flow(&mut self, five_t: FiveTuple, flow: Flow) -> FlowID
Insert a flow in the hash tables. Takes ownership of five_t and flow
Sourcepub fn get_flow(&self, flow_id: FlowID) -> Option<&Flow>
pub fn get_flow(&self, flow_id: FlowID) -> Option<&Flow>
Return a reference to the flow identified by flow_id
Sourcepub fn get_flow_mut(&mut self, flow_id: FlowID) -> Option<&mut Flow>
pub fn get_flow_mut(&mut self, flow_id: FlowID) -> Option<&mut Flow>
Return a mutable reference to the flow identified by flow_id
Sourcepub fn values(&self) -> Values<'_, FlowID, Flow>
pub fn values(&self) -> Values<'_, FlowID, Flow>
An iterator visiting all flows in arbitrary order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlowMap
impl RefUnwindSafe for FlowMap
impl Send for FlowMap
impl Sync for FlowMap
impl Unpin for FlowMap
impl UnwindSafe for FlowMap
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