DataPlane

Trait DataPlane 

pub trait DataPlane<'a, 'p, ME>
where ME: MatchEncoder<'p>,
{ type A: Action<Single>; type UA: UncodedAction<'a>; type AE: ActionEncoder<'a, A = Self::A, UA = Self::UA, Err = Error>; type OT: Dimension; type OA: Action<Self::OT, S = Self::A>; type R: RuleLike<A = Self::A, P = <ME as MatchEncoder<'p>>::P>; type RR: RawRuleLike; type M: InverseModelMonoid<Self::OA, <ME as MatchEncoder<'p>>::P, Self::OT>; type Mon: RuleMonitorLike<Self::A, Self::OA, Self::OT, Self::M, <ME as MatchEncoder<'p>>::P, Self::R>; type NK: Hash + Eq; type Topo; // Required methods fn new(config: &IbDataPlaneConfig<'p, ME>) -> Result<Self, Error> where ME: MatchEncoder<'p>, Self: Sized; fn get_monitor(&self, node: &Self::NK) -> Result<&Self::Mon, Error>; fn get_monitor_mut( &mut self, node: &Self::NK, ) -> Result<&mut Self::Mon, Error>; fn get_encoder(&'a self, node: &Self::NK) -> Result<Self::AE, Error>; fn get_encoder_index(&self, node: &Self::NK) -> Result<usize, Error>; fn iter_encoder(&'a self) -> impl Iterator<Item = (Self::NK, Self::AE)>; fn get_topology(&self, node: &Self::NK) -> Result<Self::Topo, Error>; fn iter_switch_topology( &self, ) -> impl Iterator<Item = (Self::NK, Self::Topo)>; fn iter_host_topology(&self) -> impl Iterator<Item = (Self::NK, Self::Topo)>; fn is_node_host(&self, node: &Self::NK) -> Result<bool, Error>; fn update_rules( &mut self, node: &Self::NK, insertion: impl IntoIterator<Item = Self::RR>, deletion: impl IntoIterator<Item = Self::RR>, ) -> Result<InverseModel<Self::OA, <ME as MatchEncoder<'p>>::P, Self::OT, Self::M>, Error>; fn get_engine(&self) -> &ME; }

Required Associated Types§

type A: Action<Single>

The type of action that RuleMonitor store.

type UA: UncodedAction<'a>

type AE: ActionEncoder<'a, A = Self::A, UA = Self::UA, Err = Error>

type OT: Dimension

The dimension of action of output InverseModel of RuleMonitor.

type OA: Action<Self::OT, S = Self::A>

The type of action of output InverseModel of RuleMonitor.

type R: RuleLike<A = Self::A, P = <ME as MatchEncoder<'p>>::P>

The type of rule.

type RR: RawRuleLike

type M: InverseModelMonoid<Self::OA, <ME as MatchEncoder<'p>>::P, Self::OT>

type Mon: RuleMonitorLike<Self::A, Self::OA, Self::OT, Self::M, <ME as MatchEncoder<'p>>::P, Self::R>

The type of Rule Monitor.

type NK: Hash + Eq

The type of node key.

type Topo

Required Methods§

fn new(config: &IbDataPlaneConfig<'p, ME>) -> Result<Self, Error>
where ME: MatchEncoder<'p>, Self: Sized,

fn get_monitor(&self, node: &Self::NK) -> Result<&Self::Mon, Error>

fn get_monitor_mut(&mut self, node: &Self::NK) -> Result<&mut Self::Mon, Error>

fn get_encoder(&'a self, node: &Self::NK) -> Result<Self::AE, Error>

fn get_encoder_index(&self, node: &Self::NK) -> Result<usize, Error>

fn iter_encoder(&'a self) -> impl Iterator<Item = (Self::NK, Self::AE)>

fn get_topology(&self, node: &Self::NK) -> Result<Self::Topo, Error>

fn iter_switch_topology(&self) -> impl Iterator<Item = (Self::NK, Self::Topo)>

fn iter_host_topology(&self) -> impl Iterator<Item = (Self::NK, Self::Topo)>

fn is_node_host(&self, node: &Self::NK) -> Result<bool, Error>

fn update_rules( &mut self, node: &Self::NK, insertion: impl IntoIterator<Item = Self::RR>, deletion: impl IntoIterator<Item = Self::RR>, ) -> Result<InverseModel<Self::OA, <ME as MatchEncoder<'p>>::P, Self::OT, Self::M>, Error>

fn get_engine(&self) -> &ME

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<'a, 'p, ME> DataPlane<'a, 'p, ME> for IbDataPlane<'p, ME>
where ME: MatchEncoder<'p>, IbDataPlane<'p, ME>: 'a,

§

type A = u16

§

type UA = IbAction<'a>

§

type AE = &'a SwitchSpec

§

type OT = Multiple

§

type OA = Rc<SeqAction<u16>>

§

type R = Rule<<ME as MatchEncoder<'p>>::P, u16>

§

type RR = LftEntry

§

type M = IbVecMonoid<(Rc<SeqAction<u16>>, Predicate<<ME as MatchEncoder<'p>>::P>)>

§

type Mon = IbRuleMonitor<'p, u16, ME>

§

type NK = u64

§

type Topo = Rc<NodeCommon>