Skip to main content

NodeHandle

Struct NodeHandle 

Source
pub struct NodeHandle<'a, Spec: 'a + MCTS> { /* private fields */ }
Expand description

An immutable handle to a search node. Provides access to node data, moves, and solver state.

Implementations§

Source§

impl<'a, Spec: MCTS> NodeHandle<'a, Spec>

Source

pub fn data(&self) -> &'a Spec::NodeData

User-defined node data.

Source

pub fn moves(&self) -> Moves<'_, Spec>

Iterator over this node’s moves.

Source

pub fn proven_value(&self) -> ProvenValue

The proven game-theoretic value of this node.

Source

pub fn score_bounds(&self) -> ScoreBounds

The proven score bounds of this node.

Source

pub fn into_raw(&self) -> *const ()

Convert to a raw pointer for external storage.

Source

pub unsafe fn from_raw(ptr: *const ()) -> Self

§Safety

ptr must have been obtained from into_raw() on a still-live NodeHandle.

Trait Implementations§

Source§

impl<'a, Spec: Clone + 'a + MCTS> Clone for NodeHandle<'a, Spec>

Source§

fn clone(&self) -> NodeHandle<'a, Spec>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, Spec: Copy + 'a + MCTS> Copy for NodeHandle<'a, Spec>

Auto Trait Implementations§

§

impl<'a, Spec> Freeze for NodeHandle<'a, Spec>

§

impl<'a, Spec> RefUnwindSafe for NodeHandle<'a, Spec>
where <Spec as MCTS>::NodeData: RefUnwindSafe, <<Spec as MCTS>::Eval as Evaluator<Spec>>::StateEvaluation: RefUnwindSafe, <<Spec as MCTS>::State as GameState>::Move: RefUnwindSafe, <<Spec as MCTS>::TreePolicy as TreePolicy<Spec>>::MoveEvaluation: RefUnwindSafe,

§

impl<'a, Spec> Send for NodeHandle<'a, Spec>

§

impl<'a, Spec> Sync for NodeHandle<'a, Spec>

§

impl<'a, Spec> Unpin for NodeHandle<'a, Spec>

§

impl<'a, Spec> UnsafeUnpin for NodeHandle<'a, Spec>

§

impl<'a, Spec> UnwindSafe for NodeHandle<'a, Spec>
where <Spec as MCTS>::NodeData: RefUnwindSafe, <<Spec as MCTS>::Eval as Evaluator<Spec>>::StateEvaluation: RefUnwindSafe, <<Spec as MCTS>::State as GameState>::Move: RefUnwindSafe, <<Spec as MCTS>::TreePolicy as TreePolicy<Spec>>::MoveEvaluation: RefUnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V