pub trait Id:
Copy
+ Clone
+ Eq
+ PartialEq
+ Debug
+ Into<u64>
+ From<u64> {
const NONE: Self;
// Provided methods
fn none() -> Self { ... }
fn is_none(&self) -> bool { ... }
fn as_u64(&self) -> u64 { ... }
fn from_u64(val: u64) -> Self { ... }
}Expand description
Id 基础 trait,所有自定义 Id 需实现此 trait
Required Associated Constants§
Provided Methods§
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.