Trait Computer

Source
pub trait Computer {
    type DataTy;

    const MIN: u64;

    // Required methods
    fn update_to_next_ring(&mut self);
    fn is_match(&self) -> bool;
    fn next_val(&self) -> Option<Self::DataTy>;
    fn min_val(&self) -> Self::DataTy;
    fn val_mut(&mut self, val: Self::DataTy);
    fn val(&self) -> u64;
}

Required Associated Constants§

Source

const MIN: u64

Required Associated Types§

Required Methods§

Source

fn update_to_next_ring(&mut self)

下个循环的第一个符合值

Source

fn is_match(&self) -> bool

Source

fn next_val(&self) -> Option<Self::DataTy>

Source

fn min_val(&self) -> Self::DataTy

Source

fn val_mut(&mut self, val: Self::DataTy)

Source

fn val(&self) -> u64

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§