pub trait EncodeOrd {
// Required method
fn encode_cmp(&self, other: &Self) -> Ordering;
}Available on crate feature
encode only.Expand description
Ordering, to be used when encoding network documents
Implemented for anything Ord.
Can also be implemented manually, for if a type cannot be Ord
(perhaps for trait coherence reasons).
Required Methods§
Sourcefn encode_cmp(&self, other: &Self) -> Ordering
fn encode_cmp(&self, other: &Self) -> Ordering
Compare self and other
As Ord::cmp.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.