Skip to main content

ID

Trait ID 

Source
pub trait ID:
    Eq
    + Hash
    + Borrow<str>
    + Clone
    + Display
    + Debug
    + From<String> {
    const TYPE_NAME: &'static str;
}
Expand description

A trait for ID types

Required Associated Constants§

Source

const TYPE_NAME: &'static str

The name of this type of ID (e.g. “commodity ID”, “region ID” etc.)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ID for AgentID

Source§

const TYPE_NAME: &'static str = "agent ID"

Source§

impl ID for CommodityID

Source§

const TYPE_NAME: &'static str = "commodity ID"

Source§

impl ID for ProcessID

Source§

const TYPE_NAME: &'static str = "process ID"

Source§

impl ID for RegionID

Source§

const TYPE_NAME: &'static str = "region ID"

Source§

impl ID for Season

Source§

const TYPE_NAME: &'static str = "season"

Source§

impl ID for TimeOfDay

Source§

const TYPE_NAME: &'static str = "time of day"