Trait Route

Source
pub trait Route<T>
where T: Routable,
{ // Required method fn route(&self, object: &T) -> Result<usize, SimError>; }
Expand description

Trait required for routing algorithms to implement.

Required Methods§

Source

fn route(&self, object: &T) -> Result<usize, SimError>

Given an object, return the index of the egress port to map the object to.

Implementors§

Source§

impl<T> Route<T> for DefaultAlgorithm
where T: Routable,