pub enum ObserverMode {
Never,
Always,
Every(u64),
NewBest,
}
Expand description
This is used to indicate how often the observer will observe the status. Never
deactivates
the observer, Always
and Every(i)
will call the observer in every or every ith iteration,
respectively. NewBest
will call the observer only, if a new best solution is found.
Variants§
Never
Never call the observer
Always
Call observer in every iteration
Every(u64)
Call observer every N iterations
NewBest
Call observer when new best is found
Trait Implementations§
Source§impl Clone for ObserverMode
impl Clone for ObserverMode
Source§fn clone(&self) -> ObserverMode
fn clone(&self) -> ObserverMode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ObserverMode
impl Debug for ObserverMode
Source§impl Default for ObserverMode
impl Default for ObserverMode
Source§fn default() -> ObserverMode
fn default() -> ObserverMode
The default is Always
Source§impl<'de> Deserialize<'de> for ObserverMode
impl<'de> Deserialize<'de> for ObserverMode
Source§fn 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
Source§impl Ord for ObserverMode
impl Ord for ObserverMode
Source§fn cmp(&self, other: &ObserverMode) -> Ordering
fn cmp(&self, other: &ObserverMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ObserverMode
impl PartialEq for ObserverMode
Source§impl PartialOrd for ObserverMode
impl PartialOrd for ObserverMode
Source§impl Serialize for ObserverMode
impl Serialize for ObserverMode
impl Copy for ObserverMode
impl Eq for ObserverMode
impl StructuralPartialEq for ObserverMode
Auto Trait Implementations§
impl Freeze for ObserverMode
impl RefUnwindSafe for ObserverMode
impl Send for ObserverMode
impl Sync for ObserverMode
impl Unpin for ObserverMode
impl UnwindSafe for ObserverMode
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