Skip to main content

AnyId

Enum AnyId 

Source
#[non_exhaustive]
pub enum AnyId {
Show 22 variants Module(Id<ModuleNode>, NodeId), Type(Id<TypeNode>, NodeId), Member(Id<MemberNode>, NodeId), Case(Id<CaseNode>, NodeId), Enumerator(Id<EnumeratorNode>, NodeId), BitValue(Id<BitValueNode>, NodeId), Bitfield(Id<BitfieldNode>, NodeId), Const(Id<ConstNode>, NodeId), ConstExpr(Id<ConstExprNode>, NodeId), Interface(Id<InterfaceNode>, NodeId), Operation(Id<OperationNode>, NodeId), Param(Id<ParamNode>, NodeId), Attribute(Id<AttributeNode>, NodeId), Exception(Id<ExceptionNode>, NodeId), AnnotationDef(Id<AnnotationDefNode>, NodeId), AnnotationMember(Id<AnnotationMemberNode>, NodeId), Domain(Id<DomainNode>, NodeId), Topic(Id<TopicNode>, NodeId), QosProfile(Id<QosProfileNode>, NodeId), Participant(Id<ParticipantNode>, NodeId), Endpoint(Id<EndpointNode>, NodeId), Library(Id<LibraryNode>, NodeId),
}
Expand description

A handle to any node, carrying its kind and its stable identity.

Used where a container holds mixed kinds — a module’s children, a member’s parent — without erasing which kind each entry is.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Module(Id<ModuleNode>, NodeId)

A module.

§

Type(Id<TypeNode>, NodeId)

A type.

§

Member(Id<MemberNode>, NodeId)

An aggregate member.

§

Case(Id<CaseNode>, NodeId)

A union case.

§

Enumerator(Id<EnumeratorNode>, NodeId)

An enumerator.

§

BitValue(Id<BitValueNode>, NodeId)

A bitmask bit.

§

Bitfield(Id<BitfieldNode>, NodeId)

A bitset field.

§

Const(Id<ConstNode>, NodeId)

A constant.

§

ConstExpr(Id<ConstExprNode>, NodeId)

An expression node.

§

Interface(Id<InterfaceNode>, NodeId)

An interface.

§

Operation(Id<OperationNode>, NodeId)

An operation.

§

Param(Id<ParamNode>, NodeId)

An operation parameter.

§

Attribute(Id<AttributeNode>, NodeId)

An interface attribute.

§

Exception(Id<ExceptionNode>, NodeId)

An exception.

§

AnnotationDef(Id<AnnotationDefNode>, NodeId)

An annotation declaration.

§

AnnotationMember(Id<AnnotationMemberNode>, NodeId)

An annotation member.

§

Domain(Id<DomainNode>, NodeId)

A domain.

§

Topic(Id<TopicNode>, NodeId)

A topic.

§

QosProfile(Id<QosProfileNode>, NodeId)

A QoS profile.

§

Participant(Id<ParticipantNode>, NodeId)

A participant.

§

Endpoint(Id<EndpointNode>, NodeId)

An endpoint.

§

Library(Id<LibraryNode>, NodeId)

A deployment library.

Implementations§

Source§

impl AnyId

Source

pub const fn node_id(self) -> NodeId

The node’s stable identity.

Source

pub const fn kind(self) -> NodeKind

The node’s kind.

Source

pub const fn as_type(self) -> Option<Id<TypeNode>>

The type handle, if this names a type.

Source

pub const fn as_interface(self) -> Option<Id<InterfaceNode>>

The interface handle, if this names an interface.

Source

pub const fn as_module(self) -> Option<Id<ModuleNode>>

The module handle, if this names a module.

Source

pub const fn as_member(self) -> Option<Id<MemberNode>>

The member handle, if this names a member.

Trait Implementations§

Source§

impl Clone for AnyId

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for AnyId

Source§

impl Debug for AnyId

Source§

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

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

impl Eq for AnyId

Source§

impl Hash for AnyId

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 PartialEq for AnyId

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for AnyId

Auto Trait Implementations§

§

impl Freeze for AnyId

§

impl RefUnwindSafe for AnyId

§

impl Send for AnyId

§

impl Sync for AnyId

§

impl Unpin for AnyId

§

impl UnsafeUnpin for AnyId

§

impl UnwindSafe for AnyId

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.