[][src]Trait pleco::core::move_list::MVPushable

pub trait MVPushable: Sized + IndexMut<usize> + Index<usize> + DerefMut {
    fn push_mv(&mut self, mv: BitMove);
unsafe fn unchecked_push_mv(&mut self, mv: BitMove);
unsafe fn unchecked_set_len(&mut self, len: usize);
unsafe fn list_ptr(&mut self) -> *mut Self::Output;
unsafe fn over_bounds_ptr(&mut self) -> *mut Self::Output; }

Trait to help generalize operations involving sctures containing a collection of BitMoves.

Required methods

fn push_mv(&mut self, mv: BitMove)

Adds a BitMove to the end of the list.

Safety

If pushing to the list when at capacity, does nothing.

unsafe fn unchecked_push_mv(&mut self, mv: BitMove)

Adds a BitMove to the end of the list.

Safety

Undefined behavior if pushing to the list when MoveList::len() = MAX_MOVES.

unsafe fn unchecked_set_len(&mut self, len: usize)

Set the length of the list.

Safety

Unsafe due to overwriting the length of the list

unsafe fn list_ptr(&mut self) -> *mut Self::Output

Return a pointer to the first (0-th index) element in the list.

Safety

Unsafe due to allow modification of elements possibly not inside the length.

unsafe fn over_bounds_ptr(&mut self) -> *mut Self::Output

Return a pointer to the element next to the last element in the list.

Safety

Unsafe due to allow modification of elements possibly not inside the length.

Loading content...

Implementors

impl MVPushable for MoveList[src]

impl MVPushable for ScoringMoveList[src]

Loading content...