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§
Required Associated Types§
Required Methods§
Sourcefn update_to_next_ring(&mut self)
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
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.