Skip to main content

Route

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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