Enum traitgraph::interface::NodeOrEdge
source · [−]pub enum NodeOrEdge<NodeIndex, EdgeIndex> {
Node(NodeIndex),
Edge(EdgeIndex),
}
Expand description
An enum encoding an index that can either be a node index or an edge index.
Variants
Node(NodeIndex)
A node index.
Edge(EdgeIndex)
An edge index.
Trait Implementations
sourceimpl<NodeIndex: Clone, EdgeIndex: Clone> Clone for NodeOrEdge<NodeIndex, EdgeIndex>
impl<NodeIndex: Clone, EdgeIndex: Clone> Clone for NodeOrEdge<NodeIndex, EdgeIndex>
sourcefn clone(&self) -> NodeOrEdge<NodeIndex, EdgeIndex>
fn clone(&self) -> NodeOrEdge<NodeIndex, EdgeIndex>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<NodeIndex: Debug, EdgeIndex: Debug> Debug for NodeOrEdge<NodeIndex, EdgeIndex>
impl<NodeIndex: Debug, EdgeIndex: Debug> Debug for NodeOrEdge<NodeIndex, EdgeIndex>
sourceimpl<NodeIndex: PartialEq, EdgeIndex: PartialEq> PartialEq<NodeOrEdge<NodeIndex, EdgeIndex>> for NodeOrEdge<NodeIndex, EdgeIndex>
impl<NodeIndex: PartialEq, EdgeIndex: PartialEq> PartialEq<NodeOrEdge<NodeIndex, EdgeIndex>> for NodeOrEdge<NodeIndex, EdgeIndex>
sourcefn eq(&self, other: &NodeOrEdge<NodeIndex, EdgeIndex>) -> bool
fn eq(&self, other: &NodeOrEdge<NodeIndex, EdgeIndex>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &NodeOrEdge<NodeIndex, EdgeIndex>) -> bool
fn ne(&self, other: &NodeOrEdge<NodeIndex, EdgeIndex>) -> bool
This method tests for !=
.
impl<NodeIndex: Eq, EdgeIndex: Eq> Eq for NodeOrEdge<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> StructuralEq for NodeOrEdge<NodeIndex, EdgeIndex>
impl<NodeIndex, EdgeIndex> StructuralPartialEq for NodeOrEdge<NodeIndex, EdgeIndex>
Auto Trait Implementations
impl<NodeIndex, EdgeIndex> RefUnwindSafe for NodeOrEdge<NodeIndex, EdgeIndex> where
EdgeIndex: RefUnwindSafe,
NodeIndex: RefUnwindSafe,
impl<NodeIndex, EdgeIndex> Send for NodeOrEdge<NodeIndex, EdgeIndex> where
EdgeIndex: Send,
NodeIndex: Send,
impl<NodeIndex, EdgeIndex> Sync for NodeOrEdge<NodeIndex, EdgeIndex> where
EdgeIndex: Sync,
NodeIndex: Sync,
impl<NodeIndex, EdgeIndex> Unpin for NodeOrEdge<NodeIndex, EdgeIndex> where
EdgeIndex: Unpin,
NodeIndex: Unpin,
impl<NodeIndex, EdgeIndex> UnwindSafe for NodeOrEdge<NodeIndex, EdgeIndex> where
EdgeIndex: UnwindSafe,
NodeIndex: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more