UncodedAction

Trait UncodedAction 

pub trait UncodedAction<'a>: Action<Single> + Clone {
    type N;
    type P;
    type Err;

    // Required methods
    fn get_type(&self) -> impl Into<u8>;
    fn get_ports(
        &self,
    ) -> Result<Box<dyn Iterator<Item = Self::P> + 'a>, Self::Err>;
    fn get_next_hops(
        &self,
    ) -> Result<Box<dyn Iterator<Item = Self::N> + 'a>, Self::Err>;
}
Expand description

Unencoded action on a specific device.

It may have rich information such as device name, forwrading mode, next hops, and may not be fix-sized. It can be encoded by an action encoder that contains all topology information of the device.

Required Associated Types§

type N

Type of neighbor representation.

type P

type Err

Required Methods§

fn get_type(&self) -> impl Into<u8>

fn get_ports(&self) -> Result<Box<dyn Iterator<Item = Self::P> + 'a>, Self::Err>

fn get_next_hops( &self, ) -> Result<Box<dyn Iterator<Item = Self::N> + 'a>, Self::Err>

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> UncodedAction<'a> for TypedAction<'a>

§

type N = &'a Rc<str>

§

type P = &'a Rc<str>

§

type Err = Error

§

impl<'a> UncodedAction<'a> for IbAction<'a>

§

type N = u64

§

type P = u8

§

type Err = Error