Function xor_name::closer_to_target_or_equal [] [src]

pub fn closer_to_target_or_equal(lhs: &XorName, rhs: &XorName, target: &XorName) -> bool

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.