pub enum MetaItem {
None,
Set(Vec<MetaItemId>),
Source {
file: MetaStringId,
start: SourcePosition,
end: SourcePosition,
},
NamedScope {
name: MetaStringId,
source: MetaItemId,
parent: MetaItemId,
},
IndexedScope {
index: i32,
source: MetaItemId,
parent: MetaItemId,
},
Ident {
name: MetaStringId,
scope: MetaItemId,
},
Attr {
name: MetaStringId,
value: ParamValue,
},
}Expand description
Metadata item.
Metadata items represent information about cells that does not affect computational semantics. Some metadata items only carry information about the source code, and other metadata items affect how the netlist is transformed.
Variants§
None
Absence of a metadata item. The purpose of this variant is to make metadata indices take less memory.
Set(Vec<MetaItemId>)
Multiple metadata items. The purpose of this variant is to make collections of metadata indices take less memory. A metadata set cannot contain less than two metadata items.
Source
Source location.
Fields
file: MetaStringIdFilename. Must not be empty.
start: SourcePositionStart of the range (inclusive).
end: SourcePositionEnd of the range (exclusive).
NamedScope
Scope identified by a name. A top-level named scope could be a module declaration. A named scope with a parent could be a block within a module.
Fields
name: MetaStringIdName. Must not be empty.
source: MetaItemIdSource location. Must reference MetaItem::None or MetaItem::Source.
parent: MetaItemIdParent scope. Must reference MetaItem::None, MetaItem::NamedScope, or MetaItem::IndexedScope.
IndexedScope
Scope identified by an index. A top-level named scope could be a module declaration. A named scope with a parent could be a named instance of a module within another module.
Fields
source: MetaItemIdSource location. Must reference MetaItem::None or MetaItem::Source.
parent: MetaItemIdParent scope. Must reference MetaItem::None, MetaItem::NamedScope, or MetaItem::IndexedScope.
Ident
Identifier within source code.
Fields
name: MetaStringIdName. Must not be empty.
scope: MetaItemIdContaining scope.
Must reference a MetaItem::NamedScope, or MetaItem::IndexedScope.
Attr
Implementations§
Trait Implementations§
impl Eq for MetaItem
Source§impl Ord for MetaItem
impl Ord for MetaItem
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for MetaItem
impl PartialOrd for MetaItem
impl StructuralPartialEq for MetaItem
Auto Trait Implementations§
impl Freeze for MetaItem
impl RefUnwindSafe for MetaItem
impl Send for MetaItem
impl Sync for MetaItem
impl Unpin for MetaItem
impl UnsafeUnpin for MetaItem
impl UnwindSafe for MetaItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.