pub struct OptionsRef<'g> { /* private fields */ }Expand description
Read-only iterator over the options of a Node.
Implementations§
Source§impl<'g> OptionsRef<'g>
impl<'g> OptionsRef<'g>
pub fn get(&self, play: Move) -> Option<PlayRef<'g>>
pub fn contains(&self, play: Move) -> bool
pub fn position(&self) -> Position
pub fn get_index(&self, index: usize) -> Option<PlayRef<'g>>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub const fn mode(&self) -> Mode
pub fn state(&self) -> &State
pub fn legal(&self) -> &[Move]
pub fn first(&self) -> Option<PlayRef<'g>>
pub fn after_first(&self) -> OptionsRef<'g>
Sourcepub fn split_first(&self) -> Option<(PlayRef<'g>, OptionsRef<'g>)>
pub fn split_first(&self) -> Option<(PlayRef<'g>, OptionsRef<'g>)>
Combines Self::first and Self::after_first.
When this contains all options after a move, the first option is the mainline move, and the remaining options are variations from the same position.
pub fn iter(self) -> OptionsIter<'g> ⓘ
Trait Implementations§
Source§impl Clone for OptionsRef<'_>
impl Clone for OptionsRef<'_>
impl Copy for OptionsRef<'_>
Auto Trait Implementations§
impl<'g> Freeze for OptionsRef<'g>
impl<'g> RefUnwindSafe for OptionsRef<'g>
impl<'g> Send for OptionsRef<'g>
impl<'g> Sync for OptionsRef<'g>
impl<'g> Unpin for OptionsRef<'g>
impl<'g> UnsafeUnpin for OptionsRef<'g>
impl<'g> UnwindSafe for OptionsRef<'g>
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