libutils_pointer/
comparisons.rs1use super::Pointer;
7
8use core::{
10 cmp::Ordering,
11 hash::{
12 Hash,
13 Hasher
14 }
15};
16
17
18impl<Type> PartialEq for Pointer<Type> {
24 fn eq(&self, other: &Self) -> bool {return self.as_ptr().eq(&other.as_ptr())}
25}
26
27impl<Type> PartialOrd for Pointer<Type> {
29 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {return self.as_ptr().partial_cmp(&other.as_ptr())}
30}
31
32impl<Type> Eq for Pointer<Type> {}
34
35impl<Type> Ord for Pointer<Type> {
37 fn cmp(&self, other: &Self) -> Ordering {return self.as_ptr().cmp(&other.as_ptr())}
38}
39
40impl<Type> Hash for Pointer<Type> {
42 fn hash<H: Hasher>(&self, state: &mut H) {return Hash::hash(&self.as_ptr(), state)}
43}