fn subset_cmp(&self, other: &Self) -> Option<Ordering> {
		let spl = self.shared_prefix_len(other);
		if spl == self.len() {
			// self is a prefix of other
			if spl == other.len() {
				Some(Ordering::Equal)
			} else {
				Some(Ordering::Greater)
			}
		} else if spl == other.len() {
			// other is a prefix of self
			Some(Ordering::Less)
		} else {
			// neither is a prefix of the other one
			None
		}
	}
/// Partial ordering on bit strings.
///
/// Formal definition:
///
/// ```text
///     `a < b` iff `a != b` and `b` is a prefix of `a`
/// ```
///
/// If you view a bit string as a set including all bit strings
/// starting with it, this is the subset relation.
Partial ordering on bit strings.
Formal definition.



If you view a bit string as a set including all bit strings
starting with it, this is the subset relation.
Partial ordering on bit strings . Formal definition . If you view a bit string as a set including all bit strings starting with it this is the subset relation .
fn subset_cmp(&self, other: &Self) -> Option<Ordering> {
		let spl = self.shared_prefix_len(other);
		if spl == self.len() {
			// self is a prefix of other
			if spl == other.len() {
				Some(Ordering::Equal)
			} else {
				Some(Ordering::Greater)
			}
		} else if spl == other.len() {
			// other is a prefix of self
			Some(Ordering::Less)
		} else {
			// neither is a prefix of the other one
			None
		}
	}
fn subset_cmp ( & self , other : & Self ) -> Option < Ordering > { let spl = self . shared_prefix_len ( other ) ; if spl == self . len ( ) { // self is a prefix of other if spl == other . len ( ) { Some ( Ordering :: Equal ) } else { Some ( Ordering :: Greater ) } } else if spl == other . len ( ) { // other is a prefix of self Some ( Ordering :: Less ) } else { // neither is a prefix of the other one None } }
Partial ordering on bit strings.
Partial ordering on bit strings .
&self
other
&Self