FreshCategory

Trait FreshCategory 

Source
pub trait FreshCategory: Sized {
    // Required method
    fn fresh(categories: &[Self]) -> Self;
}
Expand description

A trait which can generate a novel category given a slice of pre-existing categories. For integers, this is just the maximum number + 1.

Required Methods§

Source

fn fresh(categories: &[Self]) -> Self

Get a new category that is not in categories.

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 FreshCategory for u8

Source§

fn fresh(categories: &[Self]) -> Self

Source§

impl FreshCategory for u16

Source§

fn fresh(categories: &[Self]) -> Self

Source§

impl FreshCategory for u32

Source§

fn fresh(categories: &[Self]) -> Self

Source§

impl FreshCategory for u64

Source§

fn fresh(categories: &[Self]) -> Self

Source§

impl FreshCategory for usize

Source§

fn fresh(categories: &[Self]) -> Self

Implementors§