Struct rustre_core::id::Id
source · pub struct Id(/* private fields */);
Expand description
Name of a node, param, variable, type, package, model, etc., as it appears in the declaration
This is simply a cheap newtype around String
.
Example values
- Nodes:
sin
,adder
,map
- Variables:
a
,b
,cin
- Types:
state
- Packages:
Lustre
Usage
Ids do not remember their source span. Therefore, queries that rely on it may want to require both to be given, or to compute the Id inside them. Ids without an accompanying span should only be used as inputs to query that don’t report the errors themselves.
Implementations§
source§impl Id
impl Id
pub const LUSTRE_PACKAGE: &'static Self = _
pub const fn from_str(str: &str) -> &Self
Trait Implementations§
source§impl<'p, 'm> From<&'m Id> for IdRef<'p, 'm>
impl<'p, 'm> From<&'m Id> for IdRef<'p, 'm>
Converts the Id
to an IdRef
using IdRef::new_implicit
source§impl PartialOrd<Id> for Id
impl PartialOrd<Id> for Id
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more