pub trait BitSetOp:
Default
+ Copy
+ 'static {
const TRUSTED_HIERARCHY: bool;
const HIERARCHY_OPERANDS_CONTAIN_RESULT: bool;
// Required methods
fn hierarchy_op<T: BitBlock>(left: T, right: T) -> T;
fn data_op<T: BitBlock>(left: T, right: T) -> T;
}Expand description
Binary operation interface for BitSetInterfaces.
Implement this trait for creating your own operation.
Pay attention to hierarchical nature of hi_sparse_bitset - you
may need to apply “broader” operations to “hierarchical blocks”, then
to “data blocks”.
Required Associated Constants§
Sourceconst TRUSTED_HIERARCHY: bool
const TRUSTED_HIERARCHY: bool
Will operation between two TRUSTED_HIERARCHY bitsets produce TRUSTED_HIERARCHY as well?
Enables some optimizations. False - is always safe value.
Sourceconst HIERARCHY_OPERANDS_CONTAIN_RESULT: bool
const HIERARCHY_OPERANDS_CONTAIN_RESULT: bool
Does hierarchy_op operands contain result?
- left contains all bits from hierarchy_op result,
- right contains all bits from hierarchy_op result,
This is true for intersection, or narrower.
Enables some optimizations. False - is always a safe value.
Required Methods§
Sourcefn hierarchy_op<T: BitBlock>(left: T, right: T) -> T
fn hierarchy_op<T: BitBlock>(left: T, right: T) -> T
Operation applied to indirection/hierarchy level bitblock
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.