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§
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.