Struct kodept_ast::graph::NodeId

source ·
pub struct NodeId<Node: ?Sized>(/* private fields */);

Implementations§

source§

impl<T> NodeId<T>

source

pub fn next<U>(&self) -> NodeId<U>

source

pub fn cast<U>(self) -> NodeId<U>

source§

impl<T> NodeId<T>

source

pub fn new(id: usize) -> Self

Trait Implementations§

source§

impl<T> Clone for NodeId<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for NodeId<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for NodeId<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<Node: ?Sized> From<(usize, PhantomData<Node>)> for NodeId<Node>

source§

fn from(original: (usize, PhantomData<Node>)) -> NodeId<Node>

Converts to this type from the input type.
source§

impl From<NodeId<AbstractFunctionDeclaration>> for ASTFamily

source§

fn from(original: NodeId<AbstractFunctionDeclaration>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<Access>> for ASTFamily

source§

fn from(original: NodeId<Access>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<Application>> for ASTFamily

source§

fn from(original: NodeId<Application>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<Binary>> for ASTFamily

source§

fn from(original: NodeId<Binary>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<BodiedFunctionDeclaration>> for ASTFamily

source§

fn from(original: NodeId<BodiedFunctionDeclaration>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<CharLiteral>> for ASTFamily

source§

fn from(original: NodeId<CharLiteral>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<ElifExpression>> for ASTFamily

source§

fn from(original: NodeId<ElifExpression>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<ElseExpression>> for ASTFamily

source§

fn from(original: NodeId<ElseExpression>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<EnumDeclaration>> for ASTFamily

source§

fn from(original: NodeId<EnumDeclaration>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<ExpressionBlock>> for ASTFamily

source§

fn from(original: NodeId<ExpressionBlock>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<FileDeclaration>> for ASTFamily

source§

fn from(original: NodeId<FileDeclaration>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<Identifier>> for ASTFamily

source§

fn from(original: NodeId<Identifier>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<IfExpression>> for ASTFamily

source§

fn from(original: NodeId<IfExpression>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<InitializedVariable>> for ASTFamily

source§

fn from(original: NodeId<InitializedVariable>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<Lambda>> for ASTFamily

source§

fn from(original: NodeId<Lambda>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<ModuleDeclaration>> for ASTFamily

source§

fn from(original: NodeId<ModuleDeclaration>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<NumberLiteral>> for ASTFamily

source§

fn from(original: NodeId<NumberLiteral>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<ProdType>> for ASTFamily

source§

fn from(original: NodeId<ProdType>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<Reference>> for ASTFamily

source§

fn from(original: NodeId<Reference>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<StringLiteral>> for ASTFamily

source§

fn from(original: NodeId<StringLiteral>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<StructDeclaration>> for ASTFamily

source§

fn from(original: NodeId<StructDeclaration>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<SumType>> for ASTFamily

source§

fn from(original: NodeId<SumType>) -> ASTFamily

Converts to this type from the input type.
source§

impl<T> From<NodeId<T>> for usize

source§

fn from(value: NodeId<T>) -> Self

Converts to this type from the input type.
source§

impl From<NodeId<TupleLiteral>> for ASTFamily

source§

fn from(original: NodeId<TupleLiteral>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<TypeName>> for ASTFamily

source§

fn from(original: NodeId<TypeName>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<TypedParameter>> for ASTFamily

source§

fn from(original: NodeId<TypedParameter>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<Unary>> for ASTFamily

source§

fn from(original: NodeId<Unary>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<UntypedParameter>> for ASTFamily

source§

fn from(original: NodeId<UntypedParameter>) -> ASTFamily

Converts to this type from the input type.
source§

impl From<NodeId<Variable>> for ASTFamily

source§

fn from(original: NodeId<Variable>) -> ASTFamily

Converts to this type from the input type.
source§

impl<T> Hash for NodeId<T>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> PartialEq for NodeId<T>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<ASTFamily> for NodeId<AbstractFunctionDeclaration>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<Access>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<Application>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<Binary>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<BodiedFunctionDeclaration>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<CharLiteral>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<ElifExpression>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<ElseExpression>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<EnumDeclaration>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<ExpressionBlock>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<FileDeclaration>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<Identifier>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<IfExpression>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<InitializedVariable>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<Lambda>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<ModuleDeclaration>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<NumberLiteral>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<ProdType>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<Reference>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<StringLiteral>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<StructDeclaration>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<SumType>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<TupleLiteral>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<TypeName>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<TypedParameter>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<Unary>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<UntypedParameter>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ASTFamily> for NodeId<Variable>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(value: ASTFamily) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T> Copy for NodeId<T>

source§

impl<T> Eq for NodeId<T>

Auto Trait Implementations§

§

impl<Node: ?Sized> RefUnwindSafe for NodeId<Node>
where Node: RefUnwindSafe,

§

impl<Node: ?Sized> Send for NodeId<Node>
where Node: Send,

§

impl<Node: ?Sized> Sync for NodeId<Node>
where Node: Sync,

§

impl<Node: ?Sized> Unpin for NodeId<Node>
where Node: Unpin,

§

impl<Node: ?Sized> UnwindSafe for NodeId<Node>
where Node: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more