Struct graphlang::QuitCondition
source · [−]pub struct QuitCondition { /* private fields */ }
Expand description
Used for randomly evolving a graph using a GraphGrammar
to specify
when to stop trying random productions. All fields are optional, but
at least one must be used. Options can be set using the builder pattern
on a new
ly created struct.
Implementations
sourceimpl QuitCondition
impl QuitCondition
sourcepub const fn add_timeout(self, t: Duration) -> Self
pub const fn add_timeout(self, t: Duration) -> Self
Maximal duration allowed. Note that this technically denotes the minimal runtime after which it exits after the first possible point.
sourcepub const fn add_max_productions(self, num: NonZeroU64) -> Self
pub const fn add_max_productions(self, num: NonZeroU64) -> Self
Maximal number of productions.
sourcepub const fn on_first_valid_graph(self) -> Self
pub const fn on_first_valid_graph(self) -> Self
Quits as soon as the graph becomes valid w.r.t. the graph grammar i.e. it contains only terminal nodes.
Trait Implementations
sourceimpl Clone for QuitCondition
impl Clone for QuitCondition
sourcefn clone(&self) -> QuitCondition
fn clone(&self) -> QuitCondition
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 QuitCondition
impl Debug for QuitCondition
sourceimpl Default for QuitCondition
impl Default for QuitCondition
sourcefn default() -> QuitCondition
fn default() -> QuitCondition
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for QuitCondition
impl<'de> Deserialize<'de> for QuitCondition
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 PartialEq<QuitCondition> for QuitCondition
impl PartialEq<QuitCondition> for QuitCondition
sourcefn eq(&self, other: &QuitCondition) -> bool
fn eq(&self, other: &QuitCondition) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &QuitCondition) -> bool
fn ne(&self, other: &QuitCondition) -> bool
This method tests for !=
.
sourceimpl Serialize for QuitCondition
impl Serialize for QuitCondition
impl Copy for QuitCondition
impl StructuralPartialEq for QuitCondition
Auto Trait Implementations
impl RefUnwindSafe for QuitCondition
impl Send for QuitCondition
impl Sync for QuitCondition
impl Unpin for QuitCondition
impl UnwindSafe for QuitCondition
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> 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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more