pumpkin_solver::containers

Trait StorageKey

source
pub trait StorageKey {
    // Required methods
    fn index(&self) -> usize;
    fn create_from_index(index: usize) -> Self;
}
Expand description

A simple trait which requires that the structures implementing this trait can generate an index.

Required Methods§

source

fn index(&self) -> usize

source

fn create_from_index(index: usize) -> Self

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.

Implementations on Foreign Types§

source§

impl StorageKey for usize

source§

fn index(&self) -> usize

source§

fn create_from_index(index: usize) -> Self

Implementors§