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 UA: UncodedAction<'a>
type AE: ActionEncoder<'a, A = Self::A, UA = Self::UA, Err = Error>
type R: RuleLike<A = Self::A, P = <ME as MatchEncoder<'p>>::P>
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>
type Mon: RuleMonitorLike<Self::A, Self::OA, Self::OT, Self::M, <ME as MatchEncoder<'p>>::P, Self::R>
The type of Rule Monitor.
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.