Skip to main content

Token

Trait Token 

Source
pub unsafe trait Token {
    type Index: Copy;
    type Length: Copy;

    // Required methods
    fn index(&self) -> Self::Index;
    fn length(&self) -> Self::Length;
}
Expand description

§Safety

The index names this owner’s unique live slot and cannot change or duplicate. Its length denotes a live prefix wholly contained within that same slot.

Required Associated Types§

Required Methods§

Source

fn index(&self) -> Self::Index

Source

fn length(&self) -> Self::Length

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§