pub enum SelectionOrder {
Inherit,
Original,
Random,
Shuffled,
Sorted,
Probabilistic,
}Variants§
Implementations§
Source§impl SelectionOrder
impl SelectionOrder
Sourcepub fn resolve(self, inherited: SelectionOrder) -> SelectionOrder
pub fn resolve(self, inherited: SelectionOrder) -> SelectionOrder
Sourcepub fn is_random(&self) -> bool
pub fn is_random(&self) -> bool
Returns true if this selection order implies random selection.
This is used to determine whether a selector should use random iteration or deterministic iteration.
Sourcepub fn requires_caching(&self) -> bool
pub fn requires_caching(&self) -> bool
Returns true if this selection order requires caching.
Some selection orders need to collect all elements before iteration can begin (e.g., Shuffled, Sorted, Probabilistic).
Sourcepub fn from_random_selection(random: bool) -> Self
pub fn from_random_selection(random: bool) -> Self
Converts from a boolean random selection flag.
§Arguments
random-trueforRandom,falseforOriginal
Sourcepub fn to_random_selection(&self) -> bool
pub fn to_random_selection(&self) -> bool
Trait Implementations§
Source§impl Clone for SelectionOrder
impl Clone for SelectionOrder
Source§fn clone(&self) -> SelectionOrder
fn clone(&self) -> SelectionOrder
Returns a duplicate 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 SelectionOrder
impl Debug for SelectionOrder
Source§impl Default for SelectionOrder
impl Default for SelectionOrder
Source§fn default() -> SelectionOrder
fn default() -> SelectionOrder
Returns the “default value” for a type. Read more
Source§impl Hash for SelectionOrder
impl Hash for SelectionOrder
Source§impl PartialEq for SelectionOrder
impl PartialEq for SelectionOrder
impl Copy for SelectionOrder
impl Eq for SelectionOrder
impl StructuralPartialEq for SelectionOrder
Auto Trait Implementations§
impl Freeze for SelectionOrder
impl RefUnwindSafe for SelectionOrder
impl Send for SelectionOrder
impl Sync for SelectionOrder
impl Unpin for SelectionOrder
impl UnsafeUnpin for SelectionOrder
impl UnwindSafe for SelectionOrder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more