pub struct RantSelector { /* private fields */ }Expand description
Represents a Rant selector instance used by the resolver to select block branches.
Implementations§
Source§impl 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§
Source§impl Clone for RantSelector
impl Clone for RantSelector
Source§fn clone(&self) -> RantSelector
fn clone(&self) -> RantSelector
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 RantSelector
impl Debug for RantSelector
Source§impl From<RantSelector> for RantSelectorHandle
impl From<RantSelector> for RantSelectorHandle
Source§fn from(sel: RantSelector) -> Self
fn from(sel: RantSelector) -> Self
Converts to this type from the input type.
Source§impl TryIntoRant for RantSelector
impl TryIntoRant for RantSelector
Source§fn 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 Freeze for RantSelector
impl RefUnwindSafe for RantSelector
impl Send for RantSelector
impl Sync for RantSelector
impl Unpin for RantSelector
impl UnwindSafe for RantSelector
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