Trait kitsune_p2p::KitsuneBinType[][src]

pub trait KitsuneBinType: 'static + Send + Sync + Debug + Clone + Hash + PartialEq<Self> + Eq + PartialOrd<Self> + Ord + Into<Vec<u8, Global>> {
    fn new(bytes: Vec<u8, Global>) -> Self;
fn get_bytes(&self) -> &[u8];
fn get_loc(&self) -> DhtLocation; }
Expand description

Kitsune hashes are expected to be 36 bytes. The first 32 bytes are the proper hash. The final 4 bytes are a hash-of-the-hash that can be treated like a u32 “location”.

Required methods

Create an instance, ensuring the proper number of bytes were provided.

Fetch just the core 32 bytes (without the 4 location bytes).

Fetch the dht “loc” / location for this hash.

Implementors