Crate xor_name [] [src]

Structs

XorName

XorName can be created using the new function by passing ID as its parameter.

Enums

XorNameFromHexError

Errors that can occur when decoding a XorName from a string.

Constants

XOR_NAME_LEN

Constant byte length of XorName.

Functions

closer_to_target

Returns true if lhs is closer to target than rhs. "Closer" here is as per the Kademlia notion of XOR distance, i.e. the distance between two XorNames is the bitwise XOR of their values.

closer_to_target_or_equal

Returns true if lhs is closer to target than rhs, or when lhs == rhs. "Closer" here is as per the Kademlia notion of XOR distance, i.e. the distance between two XorNames is the bitwise XOR of their values.

slice_as_u8_64_array
slice_equal

Returns true if both slices are equal in length and have equal contents.