Enum invalid_mutations::bounds::PointerKind
source · pub enum PointerKind {
One(IndexKind),
Optional(IndexKind),
Star(IndexKind),
}
Expand description
Represents the number of pointers that exist out from a node of a particular kind.
Variants§
One(IndexKind)
Exactly one pointer out with this index kind as its destination.
Optional(IndexKind)
Zero or one pointer out with this index kind as its destination. Like the ?
operator in
regular expressions.
Star(IndexKind)
Zero or more pointers out with this index kind as its destination. Like the *
operator
in regular expressions.
Implementations§
source§impl PointerKind
impl PointerKind
sourcepub fn pointers_from(src_kind: IndexKind) -> &'static [PointerKind]
pub fn pointers_from(src_kind: IndexKind) -> &'static [PointerKind]
A list of what pointers (indexes) exist out from a particular kind of node within the module.
The only special case is FunctionDefinition
, which contains a CodeUnit
that can contain
one of several kinds of pointers out. That is not represented in this table.
pub fn to_index_kind(self) -> IndexKind
Trait Implementations§
source§impl Clone for PointerKind
impl Clone for PointerKind
source§fn clone(&self) -> PointerKind
fn clone(&self) -> PointerKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PointerKind
impl Debug for PointerKind
source§impl Hash for PointerKind
impl Hash for PointerKind
source§impl PartialEq<PointerKind> for PointerKind
impl PartialEq<PointerKind> for PointerKind
source§fn eq(&self, other: &PointerKind) -> bool
fn eq(&self, other: &PointerKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.