pub struct RoutingInfo {
pub hops: usize,
pub routing_record: Option<Vec<i32>>,
pub selected_path: Option<Vec<usize>>,
pub selections: Option<Vec<i32>>,
pub visited_routers: Option<Vec<usize>>,
pub meta: Option<Vec<RefCell<RoutingInfo>>>,
pub auxiliar: RefCell<Option<Box<dyn Any>>>,
}
Expand description
Information stored in the packet for the Routing
algorithms to operate.
Fields§
§hops: usize
Number of edges traversed (Router–Router). It is computed by the advance routine of the simulator.
routing_record: Option<Vec<i32>>
Difference in coordinates from origin to destination
selected_path: Option<Vec<usize>>
List of router indexes in the selected path from origin to destination
selections: Option<Vec<i32>>
Some selections made by the routing
visited_routers: Option<Vec<usize>>
List of router indexes that have been visited already.
meta: Option<Vec<RefCell<RoutingInfo>>>
Mostly for the generic Valiant scheme.
auxiliar: RefCell<Option<Box<dyn Any>>>
Arbitrary data with internal mutability.
Implementations§
Source§impl RoutingInfo
impl RoutingInfo
pub fn new() -> RoutingInfo
Trait Implementations§
Source§impl Debug for RoutingInfo
impl Debug for RoutingInfo
Source§impl Quantifiable for RoutingInfo
impl Quantifiable for RoutingInfo
Source§fn total_memory(&self) -> usize
fn total_memory(&self) -> usize
Get the total memory currently being employed by the implementing type. Both stack and heap.
Source§fn print_memory_breakdown(&self)
fn print_memory_breakdown(&self)
Prints by stdout how much memory is used per component.
Source§fn forecast_total_memory(&self) -> usize
fn forecast_total_memory(&self) -> usize
Get an estimation on how much memory the type could reach during the simulation.
Auto Trait Implementations§
impl !Freeze for RoutingInfo
impl !RefUnwindSafe for RoutingInfo
impl !Send for RoutingInfo
impl !Sync for RoutingInfo
impl Unpin for RoutingInfo
impl !UnwindSafe for RoutingInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more