Skip to main content

MoveMut

Struct MoveMut 

Source
pub struct MoveMut<'g> { /* private fields */ }
Expand description

A mutable reference to a move in a game.

Implementations§

Source§

impl MoveMut<'_>

Source

pub fn san(&self) -> San

Source§

impl MoveMut<'_>

Options Mutation API.

Source

pub fn raise(&mut self) -> bool

Source

pub fn lower(&mut self) -> bool

Source

pub fn promote(&mut self) -> bool

Source

pub fn demote(&mut self) -> bool

Source§

impl<'g> MoveMut<'g>

Access API.

Source

pub const fn slot(&self) -> MoveSlot

Source

pub const fn game(&self) -> &Game

Source

pub const fn as_ref(&self) -> MoveRef<'_>

Source

pub fn into_ref(self) -> MoveRef<'g>

Source

pub fn set_intro(&mut self, intro: Option<Text>)

Source

pub fn set_outro(&mut self, outro: Option<Text>)

Source

pub fn update_commands(&mut self, update: impl FnOnce(&mut Vec<Command>))

Source

pub fn update_nags(&mut self, update: impl FnOnce(&mut Vec<Nag>))

Source

pub fn update_public(&mut self, update: impl FnOnce(&mut MovePublic))

Source

pub fn comment(&self) -> Option<&Text>

Source

pub fn evaluation(&self) -> Option<&Evaluation>

Source

pub fn expanded(&self) -> bool

Source

pub fn set_comment(&mut self, comment: Option<Text>)

Source

pub fn set_evaluation(&mut self, evaluation: Option<Evaluation>)

Source

pub fn set_expanded(&mut self, expanded: bool)

Source§

impl<'g> MoveMut<'g>

Traversal API.

Source

pub fn previous(&self) -> PositionRef<'_>

Source

pub fn previous_mut(&mut self) -> PositionMut<'_>

Source

pub fn into_previous(self) -> PositionMut<'g>

Source

pub const fn position(&self) -> PositionRef<'_>

Source

pub fn position_mut(&mut self) -> PositionMut<'_>

Source

pub fn into_position(self) -> PositionMut<'g>

Methods from Deref<Target = Move>§

Source

pub fn affixes(&self) -> &Affixes

Source

pub fn commands(&self) -> &[Command]

Source

pub fn nags(&self) -> &[Nag]

Source

pub fn previous(&self) -> PositionSlot

Source

pub fn play(&self) -> Move

Source

pub fn short(&self) -> Short

Trait Implementations§

Source§

impl Deref for MoveMut<'_>

Source§

type Target = Move

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Move

Dereferences the value.

Auto Trait Implementations§

§

impl<'g> !UnwindSafe for MoveMut<'g>

§

impl<'g> Freeze for MoveMut<'g>

§

impl<'g> RefUnwindSafe for MoveMut<'g>

§

impl<'g> Send for MoveMut<'g>

§

impl<'g> Sync for MoveMut<'g>

§

impl<'g> Unpin for MoveMut<'g>

§

impl<'g> UnsafeUnpin for MoveMut<'g>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.