Enum rant::SelectorMode
source · [−]#[repr(u8)]
pub enum SelectorMode {
Show 15 variants
Random,
One,
Forward,
ForwardClamp,
ForwardMirror,
Reverse,
ReverseClamp,
ReverseMirror,
Deck,
DeckLoop,
DeckClamp,
DeckMirror,
Ping,
Pong,
NoDouble,
}
Expand description
Defines available branch selection modes for selectors.
Variants
Random
Selects a random element each time.
One
Selects the same, random element each time.
Forward
Selects each element in a wrapping sequence from left to right.
ForwardClamp
Selects each element from left to right, then repeats the right-most element.
ForwardMirror
Selects each element from left to right, then right to left, and repeats. Boundary elements are repeated.
Reverse
Selects each element in a wrapping reverse sequence from right to left.
ReverseClamp
Selects each element from right to left, then repeats the left-most element.
ReverseMirror
Selects each element from right to left, then left to right, and repeats. Boundary elements are repeated.
Deck
Selects each element once in a random sequence, then reshuffles.
DeckLoop
Selects each element once in a wrapping random sequence, without reshuffling.
DeckClamp
Selects each element once in a random sequence, repeating the final element.
DeckMirror
Selects each element once in a random sequence, then selects the same sequence backwards, then reshuffles and repeats. Mirror boundary elements are repeated.
Ping
Selects each element from left to right, switching directions each time a boundary element is reached. Boundary elements are not repeated.
Pong
Selects each element from right to left, switching directions each time a boundary element is reached. Boundary elements are not repeated.
NoDouble
Ensures that no one element index is selected twice in a row.
Trait Implementations
sourceimpl Clone for SelectorMode
impl Clone for SelectorMode
sourcefn clone(&self) -> SelectorMode
fn clone(&self) -> SelectorMode
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 SelectorMode
impl Debug for SelectorMode
sourceimpl PartialEq<SelectorMode> for SelectorMode
impl PartialEq<SelectorMode> for SelectorMode
sourceimpl TryFromRant for SelectorMode
impl TryFromRant for SelectorMode
sourcefn try_from_rant(val: RantValue) -> Result<Self, ValueError>
fn try_from_rant(val: RantValue) -> Result<Self, ValueError>
Convert from a RantValue
.
sourcefn is_optional_param_type() -> bool
fn is_optional_param_type() -> bool
Returns true
if the type can be used to represent an optional Rant parameter in native functions; otherwise, false
.
impl Copy for SelectorMode
impl StructuralPartialEq for SelectorMode
Auto Trait Implementations
impl RefUnwindSafe for SelectorMode
impl Send for SelectorMode
impl Sync for SelectorMode
impl Unpin for SelectorMode
impl UnwindSafe for SelectorMode
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