Struct rant::RantSelector
source · [−]pub struct RantSelector { /* private fields */ }
Expand description
Represents a Rant selector instance used by the resolver to select block branches.
Implementations
sourceimpl RantSelector
impl RantSelector
sourcepub fn new(mode: SelectorMode) -> Self
pub fn new(mode: SelectorMode) -> Self
Creates a new selector.
sourcepub fn into_handle(self) -> RantSelectorHandle
pub fn into_handle(self) -> RantSelectorHandle
Converts the instance into a handle.
sourcepub fn mode(&self) -> SelectorMode
pub fn mode(&self) -> SelectorMode
The mode assigned to the selector.
sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
The number of block elements that this selector is initialized for.
A value of 0 indicates that the selector is uninitialized (as selecting over 0 branches is impossible).
sourcepub fn parity(&self) -> bool
pub fn parity(&self) -> bool
Indicates the parity state of the selector. Some selectors use two alternating passes (such as mirror modes). The parity indicates which of these passes is currently active.
sourcepub fn set_frozen(&mut self, frozen: bool)
pub fn set_frozen(&mut self, frozen: bool)
Sets the frozen state of the selector.
sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Indicates whether the selector has been initialized with [Selector::init
].
Trait Implementations
sourceimpl Clone for RantSelector
impl Clone for RantSelector
sourcefn clone(&self) -> RantSelector
fn clone(&self) -> RantSelector
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 RantSelector
impl Debug for RantSelector
sourceimpl From<RantSelector> for RantSelectorHandle
impl From<RantSelector> for RantSelectorHandle
sourcefn from(sel: RantSelector) -> Self
fn from(sel: RantSelector) -> Self
Converts to this type from the input type.
sourceimpl TryIntoRant for RantSelector
impl TryIntoRant for RantSelector
sourcefn try_into_rant(self) -> Result<RantValue, ValueError>
fn try_into_rant(self) -> Result<RantValue, ValueError>
Attempts to convert to a RantValue
.
Auto Trait Implementations
impl RefUnwindSafe for RantSelector
impl Send for RantSelector
impl Sync for RantSelector
impl Unpin for RantSelector
impl UnwindSafe for RantSelector
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