[][src]Trait pour::RadixKey

pub trait RadixKey: Eq + Clone {
    type PatternType: Pattern<Self::DepthType>;
    type DepthType: PrimInt + Hash + AsPrimitive<usize>;
    fn pattern(&self, depth: Self::DepthType) -> Self::PatternType;

    fn pattern_no(depth: Self::DepthType) -> usize { ... }
}

A key which can be used in a radix trie

Associated Types

type PatternType: Pattern<Self::DepthType>

The pattern type of this radix key

type DepthType: PrimInt + Hash + AsPrimitive<usize>

The depth type of this radix key

We assume this can be losslessly as_ casted into usize, with all valid values casting back from usize

Loading content...

Required methods

fn pattern(&self, depth: Self::DepthType) -> Self::PatternType

A function to get the pattern of data for this key corresponding to a given bitdepth.

Loading content...

Provided methods

fn pattern_no(depth: Self::DepthType) -> usize

Get the pattern number of a given bitdepth

NOTE: "levels" are currently not yet supported! Returning a pattern number greater than 0 will cause a panic!

Loading content...

Implementors

impl<I> RadixKey for I where
    I: Default + Hash + PrimInt + AsPrimitive<u8> + 'static,
    u8: AsPrimitive<I>, 
[src]

type PatternType = I

type DepthType = u8

Loading content...