Struct spade::internals::FixedHandleImpl
source · pub struct FixedHandleImpl<Type, InnerOuter: InnerOuterMarker> { /* private fields */ }
Expand description
Internal type definition that is only exposed for documentation purposes.
Rust will currently not generate documentation for type definitions depending
pub(crate)
types, see #32077.
Do not use these types. Their removal will not be considered a breaking change.
Implementations§
source§impl FixedHandleImpl<VertexTag, InnerTag>
impl FixedHandleImpl<VertexTag, InnerTag>
sourcepub fn from_index(index: usize) -> Self
pub fn from_index(index: usize) -> Self
Creates a new vertex handle from a usize
.
Ideally, this method should only be used in advanced scenarios as it allows to create invalid vertex handles. When possible, attempt to retrieve handles by other means instead (see crate::handles).
§Panics
Panics if index >= 2^32
source§impl<Type: Default, InnerOuter: InnerOuterMarker> FixedHandleImpl<Type, InnerOuter>
impl<Type: Default, InnerOuter: InnerOuterMarker> FixedHandleImpl<Type, InnerOuter>
sourcepub fn index(&self) -> usize
pub fn index(&self) -> usize
Returns the internal index of this element.
Indices of the same handle type are guaranteed to be unique (e.g. different vertices will have different indices from each other).
Indices will always be in the interval 0
.. number_of_elements
(e.g. the number of
directed edges).
Adding vertices will not change any indices. Vertex removal does affect indices - the index of elements may change to swap-fill any gaps that were created.
source§impl FixedHandleImpl<DirectedEdgeTag, InnerTag>
impl FixedHandleImpl<DirectedEdgeTag, InnerTag>
sourcepub fn rev(self) -> Self
pub fn rev(self) -> Self
Returns this edge with its direction reversed.
If this edge points from v0
to v1
, the returned edge would point from v1
to v0
.
Calling rev
twice will always return the original vertex.
sourcepub fn as_undirected(self) -> FixedUndirectedEdgeHandle
pub fn as_undirected(self) -> FixedUndirectedEdgeHandle
Converts this directed edge handle into an undirected edge handle.
See also the handles module for more information.
source§impl FixedHandleImpl<FaceTag, PossiblyOuterTag>
impl FixedHandleImpl<FaceTag, PossiblyOuterTag>
source§impl FixedHandleImpl<UndirectedEdgeTag, InnerTag>
impl FixedHandleImpl<UndirectedEdgeTag, InnerTag>
sourcepub fn as_directed(&self) -> FixedDirectedEdgeHandle
pub fn as_directed(&self) -> FixedDirectedEdgeHandle
Converts this directed edge into an undirected edge handle.
Any of the two directed edges may be returned.
sourcepub fn directed_edges(&self) -> [FixedDirectedEdgeHandle; 2]
pub fn directed_edges(&self) -> [FixedDirectedEdgeHandle; 2]
Returns the two directed edges of this undirected edge in any order.
Trait Implementations§
source§impl<Type: Clone, InnerOuter: Clone + InnerOuterMarker> Clone for FixedHandleImpl<Type, InnerOuter>
impl<Type: Clone, InnerOuter: Clone + InnerOuterMarker> Clone for FixedHandleImpl<Type, InnerOuter>
source§fn clone(&self) -> FixedHandleImpl<Type, InnerOuter>
fn clone(&self) -> FixedHandleImpl<Type, InnerOuter>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<Type, InnerOuter: InnerOuterMarker> Debug for FixedHandleImpl<Type, InnerOuter>
impl<Type, InnerOuter: InnerOuterMarker> Debug for FixedHandleImpl<Type, InnerOuter>
source§impl<Type: Hash, InnerOuter: Hash + InnerOuterMarker> Hash for FixedHandleImpl<Type, InnerOuter>
impl<Type: Hash, InnerOuter: Hash + InnerOuterMarker> Hash for FixedHandleImpl<Type, InnerOuter>
source§impl<Type: Ord, InnerOuter: Ord + InnerOuterMarker> Ord for FixedHandleImpl<Type, InnerOuter>
impl<Type: Ord, InnerOuter: Ord + InnerOuterMarker> Ord for FixedHandleImpl<Type, InnerOuter>
source§fn cmp(&self, other: &FixedHandleImpl<Type, InnerOuter>) -> Ordering
fn cmp(&self, other: &FixedHandleImpl<Type, InnerOuter>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<Type: PartialEq, InnerOuter: PartialEq + InnerOuterMarker> PartialEq for FixedHandleImpl<Type, InnerOuter>
impl<Type: PartialEq, InnerOuter: PartialEq + InnerOuterMarker> PartialEq for FixedHandleImpl<Type, InnerOuter>
source§fn eq(&self, other: &FixedHandleImpl<Type, InnerOuter>) -> bool
fn eq(&self, other: &FixedHandleImpl<Type, InnerOuter>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<Type: PartialOrd, InnerOuter: PartialOrd + InnerOuterMarker> PartialOrd for FixedHandleImpl<Type, InnerOuter>
impl<Type: PartialOrd, InnerOuter: PartialOrd + InnerOuterMarker> PartialOrd for FixedHandleImpl<Type, InnerOuter>
source§fn partial_cmp(
&self,
other: &FixedHandleImpl<Type, InnerOuter>
) -> Option<Ordering>
fn partial_cmp( &self, other: &FixedHandleImpl<Type, InnerOuter> ) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more