pub trait Handle:
Clone
+ Copy
+ Debug
+ PartialEq
+ Eq
+ PartialOrd
+ Ord
+ Hash
+ DataSize
+ Sealed {
// Required methods
fn new(intid: usize) -> Self;
fn as_usize(&self) -> usize;
// Provided method
fn reindex(&self, gaps: &[(Self, isize)]) -> Self { ... }
}Expand description
The handle trait is implemented for various handle types. They have in common that refer to the internal id
of a Storable item in a struct implementing StoreFor by index. Types implementing this are lightweight and do not borrow anything, they can be passed and copied freely.
This is a sealed trait, not implementable outside this crate.
Required Methods§
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.