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§

source

const TRUSTED_HIERARCHY: bool

Will operation between two TRUSTED_HIERARCHY bitsets produce TRUSTED_HIERARCHY as well?

Enables some optimizations. False - is always safe value.

source

const HIERARCHY_OPERANDS_CONTAIN_RESULT: bool

Does hierarchy_op operands contain result?

This is true for intersection, or narrower.

Enables some optimizations. False - is always safe value.

Required Methods§

source

fn hierarchy_op<T: BitBlock>(left: T, right: T) -> T

Operation applied to indirection/hierarchy level bitblock

source

fn data_op<T: BitBlock>(left: T, right: T) -> T

Operation applied to data level bitblock

Object Safety§

This trait is not object safe.

Implementors§