pub struct MapNode<N, S: MapState> {
pub id: MapNodeId,
pub data: N,
pub state: S,
pub depth: u32,
pub parent_edge: Option<MapEdgeId>,
}Expand description
Fields§
§id: MapNodeIdノード ID
data: Nユーザー定義データ
state: S状態
depth: u32深さ
parent_edge: Option<MapEdgeId>親エッジ(ルートは None)
Implementations§
Source§impl<N, S: MapState> MapNode<N, S>
impl<N, S: MapState> MapNode<N, S>
pub fn new(id: MapNodeId, data: N, state: S) -> Self
pub fn with_state(self, state: S) -> Self
pub fn with_depth(self, depth: u32) -> Self
pub fn with_parent(self, edge: MapEdgeId) -> Self
Trait Implementations§
Source§impl<'de, N, S> Deserialize<'de> for MapNode<N, S>
impl<'de, N, S> Deserialize<'de> for MapNode<N, S>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<S: MapState> From<&MapNode<ActionNodeData, S>> for Guidance
impl<S: MapState> From<&MapNode<ActionNodeData, S>> for Guidance
Source§fn from(node: &MapNode<ActionNodeData, S>) -> Self
fn from(node: &MapNode<ActionNodeData, S>) -> Self
MapNode から Guidance への変換
V2 ExplorationSpace の select_nodes() 結果を直接 Guidance に変換する。 Manager はこれをそのまま Worker に渡せる。
§変換内容
node.data→Action(ActionNodeData から変換)node.data.discovery→hint(ExplorationTarget に設定)node.id→exploration_target.node_id
Auto Trait Implementations§
impl<N, S> Freeze for MapNode<N, S>
impl<N, S> RefUnwindSafe for MapNode<N, S>where
N: RefUnwindSafe,
S: RefUnwindSafe,
impl<N, S> Send for MapNode<N, S>
impl<N, S> Sync for MapNode<N, S>
impl<N, S> Unpin for MapNode<N, S>
impl<N, S> UnwindSafe for MapNode<N, S>where
N: UnwindSafe,
S: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more