Struct vrp_core::utils::Environment
source · [−]pub struct Environment {
pub random: Arc<dyn Random + Send + Sync + 'static>,
pub quota: Option<Arc<dyn Quota + Send + Sync + 'static>>,
pub parallelism: Parallelism,
pub logger: Arc<dyn Fn(&str) + Send + Sync + 'static>,
pub is_experimental: bool,
}Expand description
Keeps track of environment specific information which influences algorithm behavior.
Fields
random: Arc<dyn Random + Send + Sync + 'static>A wrapper on random generator.
quota: Option<Arc<dyn Quota + Send + Sync + 'static>>A global execution quota.
parallelism: ParallelismKeeps data parallelism settings.
logger: Arc<dyn Fn(&str) + Send + Sync + 'static>An information logger.
is_experimental: boolA boolean flag which signalizes that experimental behavior is allowed.
Implementations
sourceimpl Environment
impl Environment
sourcepub fn new_with_time_quota(max_time: Option<usize>) -> Environment
pub fn new_with_time_quota(max_time: Option<usize>) -> Environment
Creates an instance of Environment using optional time quota and defaults.
Trait Implementations
sourceimpl Clone for Environment
impl Clone for Environment
sourcefn clone(&self) -> Environment
fn clone(&self) -> Environment
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 Default for Environment
impl Default for Environment
sourcefn default() -> Environment
fn default() -> Environment
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl !UnwindSafe for Environment
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
impl<T> Pointable for T
impl<T> Pointable for T
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