Struct sim::models::stochastic_gate::StochasticGate
source · [−]pub struct StochasticGate { /* private fields */ }
Expand description
The stochastic gate blocks (drops) or passes jobs, based on a specified Bernoulli distribution. If the Bernoulli random variate is a 0, the job will be dropped. If the Bernoulli random variate is a 1, the job will be passed.
Implementations
sourceimpl StochasticGate
impl StochasticGate
pub fn from_value(value: Value) -> Option<Box<dyn ReportableModel>>
sourceimpl StochasticGate
impl StochasticGate
Trait Implementations
sourceimpl Clone for StochasticGate
impl Clone for StochasticGate
sourcefn clone(&self) -> StochasticGate
fn clone(&self) -> StochasticGate
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StochasticGate
impl Debug for StochasticGate
sourceimpl<'de> Deserialize<'de> for StochasticGate
impl<'de> Deserialize<'de> for StochasticGate
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl DevsModel for StochasticGate
impl DevsModel for StochasticGate
fn events_ext(
&mut self,
incoming_message: &ModelMessage,
services: &mut Services
) -> Result<(), SimulationError>
fn events_int(
&mut self,
services: &mut Services
) -> Result<Vec<ModelMessage>, SimulationError>
fn time_advance(&mut self, time_delta: f64)
fn until_next_event(&self) -> f64
sourceimpl Reportable for StochasticGate
impl Reportable for StochasticGate
sourceimpl SerializableModel for StochasticGate
impl SerializableModel for StochasticGate
sourceimpl Serialize for StochasticGate
impl Serialize for StochasticGate
impl ReportableModel for StochasticGate
Auto Trait Implementations
impl RefUnwindSafe for StochasticGate
impl Send for StochasticGate
impl Sync for StochasticGate
impl Unpin for StochasticGate
impl UnwindSafe for StochasticGate
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ModelClone for T where
T: 'static + ReportableModel + Clone,
impl<T> ModelClone for T where
T: 'static + ReportableModel + Clone,
fn clone_box(&self) -> Box<dyn ReportableModel + 'static, Global>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more