pub trait Id {
type Identifier;
// Required methods
fn get_id(&self) -> Self::Identifier;
fn ref_id(&self) -> &Self::Identifier;
}
Expand description
Specifies how to retrieve a unique identifier of an object.
Required Associated Types§
Sourcetype Identifier
type Identifier
The identifier type is usually chosen to be completely unique and repeatable across different simulations.
Required Methods§
Sourcefn get_id(&self) -> Self::Identifier
fn get_id(&self) -> Self::Identifier
Retrieves the Identifier from the object.
Sourcefn ref_id(&self) -> &Self::Identifier
fn ref_id(&self) -> &Self::Identifier
Returns a reference to the id of the object.