pub struct Edge<'id, N, ET>(/* private fields */);Expand description
Edge type, see oxidd_core::Edge
Internally, this is represented as a u32 index.
Implementations§
Trait Implementations§
Source§impl<'id, ET: Tag, const ARITY: usize> DropWith<Edge<'id, NodeWithLevel<'id, ET, ARITY>, ET>> for NodeWithLevel<'id, ET, ARITY>
impl<'id, ET: Tag, const ARITY: usize> DropWith<Edge<'id, NodeWithLevel<'id, ET, ARITY>, ET>> for NodeWithLevel<'id, ET, ARITY>
Source§impl<N: NodeBase, ET: Tag> Edge for Edge<'_, N, ET>
impl<N: NodeBase, ET: Tag> Edge for Edge<'_, N, ET>
Source§impl<'id, ET: Tag, const ARITY: usize> InnerNode<Edge<'id, NodeWithLevel<'id, ET, ARITY>, ET>> for NodeWithLevel<'id, ET, ARITY>
impl<'id, ET: Tag, const ARITY: usize> InnerNode<Edge<'id, NodeWithLevel<'id, ET, ARITY>, ET>> for NodeWithLevel<'id, ET, ARITY>
Source§type ChildrenIter<'a> = BorrowedEdgeIter<'a, Edge<'id, NodeWithLevel<'id, ET, ARITY>, ET>, Iter<'a, Edge<'id, NodeWithLevel<'id, ET, ARITY>, ET>>>
where
Self: 'a
type ChildrenIter<'a> = BorrowedEdgeIter<'a, Edge<'id, NodeWithLevel<'id, ET, ARITY>, ET>, Iter<'a, Edge<'id, NodeWithLevel<'id, ET, ARITY>, ET>>> where Self: 'a
Iterator over children of an inner node
Source§fn new(
level: LevelNo,
children: impl IntoIterator<Item = Edge<'id, Self, ET>>,
) -> Self
fn new( level: LevelNo, children: impl IntoIterator<Item = Edge<'id, Self, ET>>, ) -> Self
Create a new node Read more
Source§fn check_level(&self, check: impl FnOnce(LevelNo) -> bool) -> bool
fn check_level(&self, check: impl FnOnce(LevelNo) -> bool) -> bool
Returns the result of
check applied to the node’s level in case this
node type stores levels, otherwise returns true. Read moreSource§fn assert_level_matches(&self, level: LevelNo)
fn assert_level_matches(&self, level: LevelNo)
Panics if the node types stores a level and the node’s level is not
levelSource§fn children(&self) -> Self::ChildrenIter<'_>
fn children(&self) -> Self::ChildrenIter<'_>
Get the children of this node as an iterator
Source§fn child(&self, n: usize) -> Borrowed<'_, Edge<'id, Self, ET>>
fn child(&self, n: usize) -> Borrowed<'_, Edge<'id, Self, ET>>
Get the
n-th child of this nodeSource§impl<'a, 'id, N, ET, TM, R, MD, const TERMINALS: usize> LevelView<Edge<'id, N, ET>, N> for LevelView<'a, 'id, N, ET, TM, R, MD, TERMINALS>
impl<'a, 'id, N, ET, TM, R, MD, const TERMINALS: usize> LevelView<Edge<'id, N, ET>, N> for LevelView<'a, 'id, N, ET, TM, R, MD, TERMINALS>
Source§type Iterator<'b> = LevelViewIter<'b, 'id, N, ET>
where
Self: 'b,
Edge<'id, N, ET>: 'b
type Iterator<'b> = LevelViewIter<'b, 'id, N, ET> where Self: 'b, Edge<'id, N, ET>: 'b
Iterator over
Edges pointing to nodes at this levelSource§type Taken = TakenLevelView<'a, 'id, N, ET, TM, R, MD, TERMINALS>
type Taken = TakenLevelView<'a, 'id, N, ET, TM, R, MD, TERMINALS>
Taken level view, see
LevelView::take()Source§fn get(&self, node: &N) -> Option<&Edge<'id, N, ET>>
fn get(&self, node: &N) -> Option<&Edge<'id, N, ET>>
Get the edge corresponding to the given node (if present)
Source§fn insert(&mut self, edge: Edge<'id, N, ET>) -> bool
fn insert(&mut self, edge: Edge<'id, N, ET>) -> bool
Insert the given edge into the unique table at this level, assuming that
the referenced node is already stored in the associated manager. Read more
Source§fn get_or_insert(&mut self, node: N) -> AllocResult<Edge<'id, N, ET>>
fn get_or_insert(&mut self, node: N) -> AllocResult<Edge<'id, N, ET>>
Source§unsafe fn swap(&mut self, other: &mut Self)
unsafe fn swap(&mut self, other: &mut Self)
Move all nodes from this level to the other level and vice versa. Read more
Source§impl<'id, N, ET, TM, R, MD, const TERMINALS: usize> LevelView<Edge<'id, N, ET>, N> for TakenLevelView<'_, 'id, N, ET, TM, R, MD, TERMINALS>
impl<'id, N, ET, TM, R, MD, const TERMINALS: usize> LevelView<Edge<'id, N, ET>, N> for TakenLevelView<'_, 'id, N, ET, TM, R, MD, TERMINALS>
Source§type Iterator<'b> = LevelViewIter<'b, 'id, N, ET>
where
Self: 'b,
Edge<'id, N, ET>: 'b
type Iterator<'b> = LevelViewIter<'b, 'id, N, ET> where Self: 'b, Edge<'id, N, ET>: 'b
Iterator over
Edges pointing to nodes at this levelSource§type Taken = TakenLevelView<'_, 'id, N, ET, TM, R, MD, TERMINALS>
type Taken = TakenLevelView<'_, 'id, N, ET, TM, R, MD, TERMINALS>
Taken level view, see
LevelView::take()Source§fn get(&self, node: &N) -> Option<&Edge<'id, N, ET>>
fn get(&self, node: &N) -> Option<&Edge<'id, N, ET>>
Get the edge corresponding to the given node (if present)
Source§fn insert(&mut self, edge: Edge<'id, N, ET>) -> bool
fn insert(&mut self, edge: Edge<'id, N, ET>) -> bool
Insert the given edge into the unique table at this level, assuming that
the referenced node is already stored in the associated manager. Read more
Source§fn get_or_insert(&mut self, node: N) -> AllocResult<Edge<'id, N, ET>>
fn get_or_insert(&mut self, node: N) -> AllocResult<Edge<'id, N, ET>>
Source§unsafe fn swap(&mut self, other: &mut Self)
unsafe fn swap(&mut self, other: &mut Self)
Move all nodes from this level to the other level and vice versa. Read more
Source§impl<'id, N: NodeBase, ET: Tag> NodeSet<Edge<'id, N, ET>> for NodeSet
impl<'id, N: NodeBase, ET: Tag> NodeSet<Edge<'id, N, ET>> for NodeSet
Source§impl<'id, N, ET> Ord for Edge<'id, N, ET>
impl<'id, N, ET> Ord for Edge<'id, N, ET>
Source§impl<'id, N, ET> PartialOrd for Edge<'id, N, ET>
impl<'id, N, ET> PartialOrd for Edge<'id, N, ET>
impl<'id, N, ET> Eq for Edge<'id, N, ET>
Auto Trait Implementations§
impl<'id, N, ET> Freeze for Edge<'id, N, ET>
impl<'id, N, ET> RefUnwindSafe for Edge<'id, N, ET>where
N: RefUnwindSafe,
ET: RefUnwindSafe,
impl<'id, N, ET> Send for Edge<'id, N, ET>
impl<'id, N, ET> Sync for Edge<'id, N, ET>
impl<'id, N, ET> Unpin for Edge<'id, N, ET>
impl<'id, N, ET> UnwindSafe for Edge<'id, N, ET>where
N: UnwindSafe,
ET: 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> 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