[−][src]Struct caminos_lib::traffic::Sum
Traffic which is the sum of a list of oter traffics. While it will clearly work when the sum of the generation rates is at most 1, it should behave nicely enough otherwise.
Implementations
impl Sum
[src]
pub fn new(arg: TrafficBuilderArgument<'_>) -> Sum
[src]
Trait Implementations
impl Debug for Sum
[src]
impl Quantifiable for Sum
[src]
pub fn total_memory(&self) -> usize
[src]
pub fn print_memory_breakdown(&self)
[src]
pub fn forecast_total_memory(&self) -> usize
[src]
impl Traffic for Sum
[src]
pub fn generate_message(
&mut self,
origin: usize,
cycle: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> Result<Rc<Message>, TrafficError>
[src]
&mut self,
origin: usize,
cycle: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> Result<Rc<Message>, TrafficError>
pub fn probability_per_cycle(&self, server: usize) -> f32
[src]
pub fn try_consume(
&mut self,
message: Rc<Message>,
cycle: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> bool
[src]
&mut self,
message: Rc<Message>,
cycle: usize,
topology: &Box<dyn Topology>,
rng: &RefCell<StdRng>
) -> bool
pub fn is_finished(&self) -> bool
[src]
pub fn should_generate(&self, server: usize, rng: &RefCell<StdRng>) -> bool
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Sum
impl !Send for Sum
impl !Sync for Sum
impl Unpin for Sum
impl !UnwindSafe for Sum
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,