Token

Trait Token 

Source
pub unsafe trait Token: Clone + Eq { }
Expand description

A type that an Identifier produces and is owned by an Identifier

If two tokens compare equal, then they should behave identically under Identifier::owns_token operation.

§Safety

  • it should be not possible to change the behavior of PartialEq::eq or Identifier::owns_token via a shared reference to a Token
  • clones/copies of a token should be equal to each other

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§