pub trait PartialOrd<Rhs = Self>: PartialEq<Rhs>where
Rhs: ?Sized,{
// Required method
fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
// Provided methods
fn lt(&self, other: &Rhs) -> bool { ... }
fn le(&self, other: &Rhs) -> bool { ... }
fn gt(&self, other: &Rhs) -> bool { ... }
fn ge(&self, other: &Rhs) -> bool { ... }
}
Expand description
Trait for types that form a partial order.
The lt
, le
, gt
, and ge
methods of this trait can be called using
the <
, <=
, >
, and >=
operators, respectively.
The methods of this trait must be consistent with each other and with those of PartialEq
.
The following conditions must hold:
a == b
if and only ifpartial_cmp(a, b) == Some(Equal)
.a < b
if and only ifpartial_cmp(a, b) == Some(Less)
a > b
if and only ifpartial_cmp(a, b) == Some(Greater)
a <= b
if and only ifa < b || a == b
a >= b
if and only ifa > b || a == b
a != b
if and only if!(a == b)
.
Conditions 2–5 above are ensured by the default implementation.
Condition 6 is already ensured by PartialEq
.
If Ord
is also implemented for Self
and Rhs
, it must also be consistent with
partial_cmp
(see the documentation of that trait for the exact requirements). It’s
easy to accidentally make them disagree by deriving some of the traits and manually
implementing others.
The comparison relations must satisfy the following conditions
(for all a
, b
, c
of type A
, B
, C
):
- Transitivity: if
A: PartialOrd<B>
andB: PartialOrd<C>
andA: PartialOrd<C>
, thena < b
andb < c
impliesa < c
. The same must hold for both==
and>
. This must also work for longer chains, such as whenA: PartialOrd<B>
,B: PartialOrd<C>
,C: PartialOrd<D>
, andA: PartialOrd<D>
all exist. - Duality: if
A: PartialOrd<B>
andB: PartialOrd<A>
, thena < b
if and only ifb > a
.
Note that the B: PartialOrd<A>
(dual) and A: PartialOrd<C>
(transitive) impls are not forced to exist, but these requirements apply
whenever they do exist.
Violating these requirements is a logic error. The behavior resulting from a logic error is not
specified, but users of the trait must ensure that such logic errors do not result in
undefined behavior. This means that unsafe
code must not rely on the correctness of these
methods.
§Cross-crate considerations
Upholding the requirements stated above can become tricky when one crate implements PartialOrd
for a type of another crate (i.e., to allow comparing one of its own types with a type from the
standard library). The recommendation is to never implement this trait for a foreign type. In
other words, such a crate should do impl PartialOrd<ForeignType> for LocalType
, but it should
not do impl PartialOrd<LocalType> for ForeignType
.
This avoids the problem of transitive chains that criss-cross crate boundaries: for all local
types T
, you may assume that no other crate will add impl
s that allow comparing T < U
. In
other words, if other crates add impl
s that allow building longer transitive chains U1 < ... < T < V1 < ...
, then all the types that appear to the right of T
must be types that the crate
defining T
already knows about. This rules out transitive chains where downstream crates can
add new impl
s that “stitch together” comparisons of foreign types in ways that violate
transitivity.
Not having such foreign impl
s also avoids forward compatibility issues where one crate adding
more PartialOrd
implementations can cause build failures in downstream crates.
§Corollaries
The following corollaries follow from the above requirements:
- irreflexivity of
<
and>
:!(a < a)
,!(a > a)
- transitivity of
>
: ifa > b
andb > c
thena > c
- duality of
partial_cmp
:partial_cmp(a, b) == partial_cmp(b, a).map(Ordering::reverse)
§Strict and non-strict partial orders
The <
and >
operators behave according to a strict partial order.
However, <=
and >=
do not behave according to a non-strict
partial order.
That is because mathematically, a non-strict partial order would require
reflexivity, i.e. a <= a
would need to be true for every a
. This isn’t
always the case for types that implement PartialOrd
, for example:
let a = f64::sqrt(-1.0);
assert_eq!(a <= a, false);
§Derivable
This trait can be used with #[derive]
.
When derive
d on structs, it will produce a
lexicographic ordering
based on the top-to-bottom declaration order of the struct’s members.
When derive
d on enums, variants are primarily ordered by their discriminants.
Secondarily, they are ordered by their fields.
By default, the discriminant is smallest for variants at the top, and
largest for variants at the bottom. Here’s an example:
#[derive(PartialEq, PartialOrd)]
enum E {
Top,
Bottom,
}
assert!(E::Top < E::Bottom);
However, manually setting the discriminants can override this default behavior:
#[derive(PartialEq, PartialOrd)]
enum E {
Top = 2,
Bottom = 1,
}
assert!(E::Bottom < E::Top);
§How can I implement PartialOrd
?
PartialOrd
only requires implementation of the partial_cmp
method, with the others
generated from default implementations.
However it remains possible to implement the others separately for types which do not have a
total order. For example, for floating point numbers, NaN < 0 == false
and NaN >= 0 == false
(cf. IEEE 754-2008 section 5.11).
PartialOrd
requires your type to be PartialEq
.
If your type is Ord
, you can implement partial_cmp
by using cmp
:
use std::cmp::Ordering;
#[derive(Eq)]
struct Person {
id: u32,
name: String,
height: u32,
}
impl PartialOrd for Person {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
impl Ord for Person {
fn cmp(&self, other: &Self) -> Ordering {
self.height.cmp(&other.height)
}
}
impl PartialEq for Person {
fn eq(&self, other: &Self) -> bool {
self.height == other.height
}
}
You may also find it useful to use partial_cmp
on your type’s fields. Here
is an example of Person
types who have a floating-point height
field that
is the only field to be used for sorting:
use std::cmp::Ordering;
struct Person {
id: u32,
name: String,
height: f64,
}
impl PartialOrd for Person {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.height.partial_cmp(&other.height)
}
}
impl PartialEq for Person {
fn eq(&self, other: &Self) -> bool {
self.height == other.height
}
}
§Examples
let x: u32 = 0;
let y: u32 = 1;
assert_eq!(x < y, true);
assert_eq!(x.lt(&y), true);
Required Methods§
1.0.0 · sourcefn partial_cmp(&self, other: &Rhs) -> Option<Ordering>
fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists.
§Examples
use std::cmp::Ordering;
let result = 1.0.partial_cmp(&2.0);
assert_eq!(result, Some(Ordering::Less));
let result = 1.0.partial_cmp(&1.0);
assert_eq!(result, Some(Ordering::Equal));
let result = 2.0.partial_cmp(&1.0);
assert_eq!(result, Some(Ordering::Greater));
When comparison is impossible:
let result = f64::NAN.partial_cmp(&1.0);
assert_eq!(result, None);
Provided Methods§
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
Tests less than (for self
and other
) and is used by the <
operator.
§Examples
assert_eq!(1.0 < 1.0, false);
assert_eq!(1.0 < 2.0, true);
assert_eq!(2.0 < 1.0, false);
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
Tests less than or equal to (for self
and other
) and is used by the
<=
operator.
§Examples
assert_eq!(1.0 <= 1.0, true);
assert_eq!(1.0 <= 2.0, true);
assert_eq!(2.0 <= 1.0, false);
Implementors§
impl PartialOrd for BigEndian
impl PartialOrd for LittleEndian
impl PartialOrd for Keviyah
impl PartialOrd for StartOfYear
impl PartialOrd for YearType
impl PartialOrd for WebGLVersion
impl PartialOrd for chrono::month::Month
impl PartialOrd for LabelStyle
impl PartialOrd for codespan_reporting::diagnostic::Severity
impl PartialOrd for Meaning
impl PartialOrd for SectionId
impl PartialOrd for ColumnType
impl PartialOrd for AttrValueKind
impl PartialOrd for DoctypeIdKind
impl PartialOrd for RawKind
impl PartialOrd for ScriptEscapeKind
impl PartialOrd for html5ever::tokenizer::states::State
impl PartialOrd for AnyCalendarKind
impl PartialOrd for ICU4XCollatorAlternateHandling
impl PartialOrd for ICU4XCollatorBackwardSecondLevel
impl PartialOrd for ICU4XCollatorCaseFirst
impl PartialOrd for ICU4XCollatorCaseLevel
impl PartialOrd for ICU4XCollatorMaxVariable
impl PartialOrd for ICU4XCollatorNumeric
impl PartialOrd for ICU4XCollatorStrength
impl PartialOrd for AlternateHandling
impl PartialOrd for CaseFirst
impl PartialOrd for Strength
impl PartialOrd for FieldLength
impl PartialOrd for FieldNumericOverrides
impl PartialOrd for Day
impl PartialOrd for DayPeriod
impl PartialOrd for FieldSymbol
impl PartialOrd for Hour
impl PartialOrd for icu_datetime::fields::symbols::Month
impl PartialOrd for Second
impl PartialOrd for TimeZone
impl PartialOrd for Week
impl PartialOrd for Weekday
impl PartialOrd for Year
impl PartialOrd for ExtensionType
impl PartialOrd for PluralCategory
impl PartialOrd for icu_properties::props::GeneralCategory
impl PartialOrd for CheckedBidiPairedBracketType
impl PartialOrd for LocaleFallbackPriority
impl PartialOrd for LocaleFallbackSupplement
impl PartialOrd for NormalForm
impl PartialOrd for khronos_egl::Version
impl PartialOrd for log::Level
impl PartialOrd for log::LevelFilter
impl PartialOrd for naga::back::glsl::Version
impl PartialOrd for FilterableTriggeringRule
impl PartialOrd for naga::diagnostic_filter::Severity
impl PartialOrd for StandardFilterableTriggeringRule
impl PartialOrd for AddressSpace
impl PartialOrd for ArraySize
impl PartialOrd for AtomicFunction
impl PartialOrd for BinaryOperator
impl PartialOrd for naga::BuiltIn
impl PartialOrd for CollectiveOperation
impl PartialOrd for ConservativeDepth
impl PartialOrd for DerivativeAxis
impl PartialOrd for DerivativeControl
impl PartialOrd for GatherMode
impl PartialOrd for ImageClass
impl PartialOrd for ImageDimension
impl PartialOrd for Interpolation
impl PartialOrd for naga::Literal
impl PartialOrd for MathFunction
impl PartialOrd for PendingArraySize
impl PartialOrd for naga::RayQueryIntersection
impl PartialOrd for RelationalFunction
impl PartialOrd for Sampling
impl PartialOrd for ScalarKind
impl PartialOrd for ShaderStage
impl PartialOrd for StorageFormat
impl PartialOrd for SubgroupOperation
impl PartialOrd for SwizzleComponent
impl PartialOrd for UnaryOperator
impl PartialOrd for VectorSize
impl PartialOrd for ExpressionKind
impl PartialOrd for petgraph::Direction
impl PartialOrd for ProfilerCategory
impl PartialOrd for TimerMetadataFrameType
impl PartialOrd for TimerMetadataReflowType
impl PartialOrd for Channels
impl PartialOrd for ColorSpace
impl PartialOrd for Utf8Sequence
impl PartialOrd for ron::value::Number
impl PartialOrd for ron::value::Value
impl PartialOrd for rustix::ioctl::Direction
impl PartialOrd for SocketAddrAny
impl PartialOrd for servo_media_audio::graph::Void
impl PartialOrd for ParamDir
impl PartialOrd for ParamType
impl PartialOrd for AccessQualifier
impl PartialOrd for AddressingModel
impl PartialOrd for spirv::BuiltIn
impl PartialOrd for CLOp
impl PartialOrd for Capability
impl PartialOrd for CooperativeMatrixLayout
impl PartialOrd for CooperativeMatrixUse
impl PartialOrd for Decoration
impl PartialOrd for Dim
impl PartialOrd for ExecutionMode
impl PartialOrd for ExecutionModel
impl PartialOrd for FPDenormMode
impl PartialOrd for FPOperationMode
impl PartialOrd for FPRoundingMode
impl PartialOrd for FunctionParameterAttribute
impl PartialOrd for GLOp
impl PartialOrd for GroupOperation
impl PartialOrd for HostAccessQualifier
impl PartialOrd for ImageChannelDataType
impl PartialOrd for ImageChannelOrder
impl PartialOrd for ImageFormat
impl PartialOrd for InitializationModeQualifier
impl PartialOrd for KernelEnqueueFlags
impl PartialOrd for LinkageType
impl PartialOrd for LoadCacheControl
impl PartialOrd for MemoryModel
impl PartialOrd for Op
impl PartialOrd for OverflowModes
impl PartialOrd for PackedVectorFormat
impl PartialOrd for QuantizationModes
impl PartialOrd for RayQueryCandidateIntersectionType
impl PartialOrd for RayQueryCommittedIntersectionType
impl PartialOrd for spirv::RayQueryIntersection
impl PartialOrd for SamplerAddressingMode
impl PartialOrd for SamplerFilterMode
impl PartialOrd for Scope
impl PartialOrd for SourceLanguage
impl PartialOrd for StorageClass
impl PartialOrd for StoreCacheControl
impl PartialOrd for ChannelKeyword
impl PartialOrd for ViewportUnitUsage
impl PartialOrd for ChildRestyleRequirement
impl PartialOrd for CascadeLevel
impl PartialOrd for DataValidity
impl PartialOrd for Origin
impl PartialOrd for style::stylesheets::rule_parser::State
impl PartialOrd for SortKey
impl PartialOrd for AngleDimension
impl PartialOrd for BorderStyle
impl PartialOrd for AbsoluteLength
impl PartialOrd for ContainerRelativeLength
impl PartialOrd for FontRelativeLength
impl PartialOrd for NoCalcLength
impl PartialOrd for ViewportPercentageLength
impl PartialOrd for OutlineStyle
impl PartialOrd for PaintOrder
impl PartialOrd for CaptionSide
impl PartialOrd for AllowedNumericType
impl PartialOrd for DeflateLevel
impl PartialOrd for EmojiStatus
impl PartialOrd for unicode_properties::tables::general_category::GeneralCategory
impl PartialOrd for GeneralCategoryGroup
impl PartialOrd for ExtendMode
impl PartialOrd for FontHinting
impl PartialOrd for FontLCDFilter
impl PartialOrd for FontRenderMode
impl PartialOrd for ShaderVersion
impl PartialOrd for ShaderModel
impl PartialOrd for SubpixelDirection
impl PartialOrd for SubpixelOffset
impl PartialOrd for ModuleStatus
impl PartialOrd for DOMErrorName
impl PartialOrd for ReadyState
impl PartialOrd for XPathResultType
impl PartialOrd for Ordering
impl PartialOrd for AsciiChar
impl PartialOrd for Infallible
impl PartialOrd for IpAddr
impl PartialOrd for SocketAddr
impl PartialOrd for ErrorKind
impl PartialOrd for bool
impl PartialOrd for char
impl PartialOrd for f16
impl PartialOrd for f32
impl PartialOrd for f64
impl PartialOrd for f128
impl PartialOrd for i8
impl PartialOrd for i16
impl PartialOrd for i32
impl PartialOrd for i64
impl PartialOrd for i128
impl PartialOrd for isize
impl PartialOrd for !
impl PartialOrd for str
Implements comparison operations on strings.
Strings are compared lexicographically by their byte values. This compares Unicode code
points based on their positions in the code charts. This is not necessarily the same as
“alphabetical” order, which varies by language and locale. Comparing strings according to
culturally-accepted standards requires locale-specific data that is outside the scope of
the str
type.
impl PartialOrd for u8
impl PartialOrd for u16
impl PartialOrd for u32
impl PartialOrd for u64
impl PartialOrd for u128
impl PartialOrd for ()
impl PartialOrd for usize
impl PartialOrd for aead::Error
impl PartialOrd for aho_corasick::util::primitives::PatternID
impl PartialOrd for aho_corasick::util::primitives::StateID
impl PartialOrd for Au
impl PartialOrd for AccelerationStructureCreateFlagsKHR
impl PartialOrd for AccessFlags2
impl PartialOrd for AccessFlags
impl PartialOrd for AcquireProfilingLockFlagsKHR
impl PartialOrd for AttachmentDescriptionFlags
impl PartialOrd for BufferCreateFlags
impl PartialOrd for BufferUsageFlags2KHR
impl PartialOrd for BufferUsageFlags
impl PartialOrd for BuildAccelerationStructureFlagsKHR
impl PartialOrd for BuildMicromapFlagsEXT
impl PartialOrd for ColorComponentFlags
impl PartialOrd for CommandBufferResetFlags
impl PartialOrd for CommandBufferUsageFlags
impl PartialOrd for CommandPoolCreateFlags
impl PartialOrd for CommandPoolResetFlags
impl PartialOrd for CompositeAlphaFlagsKHR
impl PartialOrd for ConditionalRenderingFlagsEXT
impl PartialOrd for CullModeFlags
impl PartialOrd for DebugReportFlagsEXT
impl PartialOrd for DebugUtilsMessageSeverityFlagsEXT
impl PartialOrd for DebugUtilsMessageTypeFlagsEXT
impl PartialOrd for DependencyFlags
impl PartialOrd for DescriptorBindingFlags
impl PartialOrd for DescriptorPoolCreateFlags
impl PartialOrd for DescriptorSetLayoutCreateFlags
impl PartialOrd for DeviceAddressBindingFlagsEXT
impl PartialOrd for DeviceDiagnosticsConfigFlagsNV
impl PartialOrd for DeviceGroupPresentModeFlagsKHR
impl PartialOrd for DeviceQueueCreateFlags
impl PartialOrd for DisplayPlaneAlphaFlagsKHR
impl PartialOrd for EventCreateFlags
impl PartialOrd for ExportMetalObjectTypeFlagsEXT
impl PartialOrd for ExternalFenceFeatureFlags
impl PartialOrd for ExternalFenceHandleTypeFlags
impl PartialOrd for ExternalMemoryFeatureFlags
impl PartialOrd for ExternalMemoryFeatureFlagsNV
impl PartialOrd for ExternalMemoryHandleTypeFlags
impl PartialOrd for ExternalMemoryHandleTypeFlagsNV
impl PartialOrd for ExternalSemaphoreFeatureFlags
impl PartialOrd for ExternalSemaphoreHandleTypeFlags
impl PartialOrd for FenceCreateFlags
impl PartialOrd for FenceImportFlags
impl PartialOrd for FormatFeatureFlags2
impl PartialOrd for FormatFeatureFlags
impl PartialOrd for FrameBoundaryFlagsEXT
impl PartialOrd for FramebufferCreateFlags
impl PartialOrd for GeometryFlagsKHR
impl PartialOrd for GeometryInstanceFlagsKHR
impl PartialOrd for GraphicsPipelineLibraryFlagsEXT
impl PartialOrd for HostImageCopyFlagsEXT
impl PartialOrd for ImageAspectFlags
impl PartialOrd for ImageCompressionFixedRateFlagsEXT
impl PartialOrd for ImageCompressionFlagsEXT
impl PartialOrd for ImageConstraintsInfoFlagsFUCHSIA
impl PartialOrd for ImageCreateFlags
impl PartialOrd for ImageFormatConstraintsFlagsFUCHSIA
impl PartialOrd for ImageUsageFlags
impl PartialOrd for ImageViewCreateFlags
impl PartialOrd for IndirectCommandsLayoutUsageFlagsNV
impl PartialOrd for IndirectStateFlagsNV
impl PartialOrd for InstanceCreateFlags
impl PartialOrd for MemoryAllocateFlags
impl PartialOrd for MemoryDecompressionMethodFlagsNV
impl PartialOrd for MemoryHeapFlags
impl PartialOrd for MemoryMapFlags
impl PartialOrd for ash::vk::bitflags::MemoryPropertyFlags
impl PartialOrd for MemoryUnmapFlagsKHR
impl PartialOrd for MicromapCreateFlagsEXT
impl PartialOrd for OpticalFlowExecuteFlagsNV
impl PartialOrd for OpticalFlowGridSizeFlagsNV
impl PartialOrd for OpticalFlowSessionCreateFlagsNV
impl PartialOrd for OpticalFlowUsageFlagsNV
impl PartialOrd for PeerMemoryFeatureFlags
impl PartialOrd for PerformanceCounterDescriptionFlagsKHR
impl PartialOrd for PhysicalDeviceSchedulingControlsFlagsARM
impl PartialOrd for PipelineCacheCreateFlags
impl PartialOrd for PipelineColorBlendStateCreateFlags
impl PartialOrd for PipelineCompilerControlFlagsAMD
impl PartialOrd for PipelineCreateFlags2KHR
impl PartialOrd for PipelineCreateFlags
impl PartialOrd for PipelineCreationFeedbackFlags
impl PartialOrd for PipelineDepthStencilStateCreateFlags
impl PartialOrd for PipelineLayoutCreateFlags
impl PartialOrd for PipelineShaderStageCreateFlags
impl PartialOrd for PipelineStageFlags2
impl PartialOrd for PipelineStageFlags
impl PartialOrd for PresentGravityFlagsEXT
impl PartialOrd for PresentScalingFlagsEXT
impl PartialOrd for PrivateDataSlotCreateFlags
impl PartialOrd for QueryControlFlags
impl PartialOrd for QueryPipelineStatisticFlags
impl PartialOrd for QueryResultFlags
impl PartialOrd for QueueFlags
impl PartialOrd for RenderPassCreateFlags
impl PartialOrd for RenderingFlags
impl PartialOrd for ResolveModeFlags
impl PartialOrd for SampleCountFlags
impl PartialOrd for SamplerCreateFlags
impl PartialOrd for SemaphoreCreateFlags
impl PartialOrd for SemaphoreImportFlags
impl PartialOrd for SemaphoreWaitFlags
impl PartialOrd for ShaderCorePropertiesFlagsAMD
impl PartialOrd for ShaderCreateFlagsEXT
impl PartialOrd for ShaderModuleCreateFlags
impl PartialOrd for ShaderStageFlags
impl PartialOrd for SparseImageFormatFlags
impl PartialOrd for SparseMemoryBindFlags
impl PartialOrd for StencilFaceFlags
impl PartialOrd for SubgroupFeatureFlags
impl PartialOrd for SubmitFlags
impl PartialOrd for SubpassDescriptionFlags
impl PartialOrd for SurfaceCounterFlagsEXT
impl PartialOrd for SurfaceTransformFlagsKHR
impl PartialOrd for SwapchainCreateFlagsKHR
impl PartialOrd for SwapchainImageUsageFlagsANDROID
impl PartialOrd for ToolPurposeFlags
impl PartialOrd for VideoCapabilityFlagsKHR
impl PartialOrd for VideoChromaSubsamplingFlagsKHR
impl PartialOrd for VideoCodecOperationFlagsKHR
impl PartialOrd for VideoCodingControlFlagsKHR
impl PartialOrd for VideoComponentBitDepthFlagsKHR
impl PartialOrd for VideoDecodeCapabilityFlagsKHR
impl PartialOrd for VideoDecodeH264PictureLayoutFlagsKHR
impl PartialOrd for VideoDecodeUsageFlagsKHR
impl PartialOrd for VideoEncodeCapabilityFlagsKHR
impl PartialOrd for VideoEncodeContentFlagsKHR
impl PartialOrd for VideoEncodeFeedbackFlagsKHR
impl PartialOrd for VideoEncodeFlagsKHR
impl PartialOrd for VideoEncodeH264CapabilityFlagsKHR
impl PartialOrd for VideoEncodeH264RateControlFlagsKHR
impl PartialOrd for VideoEncodeH264StdFlagsKHR
impl PartialOrd for VideoEncodeH265CapabilityFlagsKHR
impl PartialOrd for VideoEncodeH265CtbSizeFlagsKHR
impl PartialOrd for VideoEncodeH265RateControlFlagsKHR
impl PartialOrd for VideoEncodeH265StdFlagsKHR
impl PartialOrd for VideoEncodeH265TransformBlockSizeFlagsKHR
impl PartialOrd for VideoEncodeRateControlModeFlagsKHR
impl PartialOrd for VideoEncodeUsageFlagsKHR
impl PartialOrd for VideoSessionCreateFlagsKHR
impl PartialOrd for AccelerationStructureKHR
impl PartialOrd for AccelerationStructureMotionInfoFlagsNV
impl PartialOrd for AccelerationStructureMotionInstanceFlagsNV
impl PartialOrd for AccelerationStructureNV
impl PartialOrd for AndroidSurfaceCreateFlagsKHR
impl PartialOrd for Buffer
impl PartialOrd for BufferCollectionFUCHSIA
impl PartialOrd for BufferView
impl PartialOrd for BufferViewCreateFlags
impl PartialOrd for CommandBuffer
impl PartialOrd for CommandPool
impl PartialOrd for CommandPoolTrimFlags
impl PartialOrd for CuFunctionNVX
impl PartialOrd for CuModuleNVX
impl PartialOrd for CudaFunctionNV
impl PartialOrd for CudaModuleNV
impl PartialOrd for DebugReportCallbackEXT
impl PartialOrd for DebugUtilsMessengerCallbackDataFlagsEXT
impl PartialOrd for DebugUtilsMessengerCreateFlagsEXT
impl PartialOrd for DebugUtilsMessengerEXT
impl PartialOrd for DeferredOperationKHR
impl PartialOrd for DescriptorPool
impl PartialOrd for DescriptorPoolResetFlags
impl PartialOrd for DescriptorSet
impl PartialOrd for DescriptorSetLayout
impl PartialOrd for DescriptorUpdateTemplate
impl PartialOrd for DescriptorUpdateTemplateCreateFlags
impl PartialOrd for Device
impl PartialOrd for DeviceCreateFlags
impl PartialOrd for DeviceMemory
impl PartialOrd for DeviceMemoryReportFlagsEXT
impl PartialOrd for DirectDriverLoadingFlagsLUNARG
impl PartialOrd for DirectFBSurfaceCreateFlagsEXT
impl PartialOrd for DisplayKHR
impl PartialOrd for DisplayModeCreateFlagsKHR
impl PartialOrd for DisplayModeKHR
impl PartialOrd for DisplaySurfaceCreateFlagsKHR
impl PartialOrd for Event
impl PartialOrd for Fence
impl PartialOrd for Framebuffer
impl PartialOrd for HeadlessSurfaceCreateFlagsEXT
impl PartialOrd for IOSSurfaceCreateFlagsMVK
impl PartialOrd for Image
impl PartialOrd for ImagePipeSurfaceCreateFlagsFUCHSIA
impl PartialOrd for ImageView
impl PartialOrd for IndirectCommandsLayoutNV
impl PartialOrd for Instance
impl PartialOrd for MacOSSurfaceCreateFlagsMVK
impl PartialOrd for MetalSurfaceCreateFlagsEXT
impl PartialOrd for MicromapEXT
impl PartialOrd for OpticalFlowSessionNV
impl PartialOrd for PerformanceConfigurationINTEL
impl PartialOrd for PhysicalDevice
impl PartialOrd for Pipeline
impl PartialOrd for PipelineCache
impl PartialOrd for PipelineCoverageModulationStateCreateFlagsNV
impl PartialOrd for PipelineCoverageReductionStateCreateFlagsNV
impl PartialOrd for PipelineCoverageToColorStateCreateFlagsNV
impl PartialOrd for PipelineDiscardRectangleStateCreateFlagsEXT
impl PartialOrd for PipelineDynamicStateCreateFlags
impl PartialOrd for PipelineInputAssemblyStateCreateFlags
impl PartialOrd for PipelineLayout
impl PartialOrd for PipelineMultisampleStateCreateFlags
impl PartialOrd for PipelineRasterizationConservativeStateCreateFlagsEXT
impl PartialOrd for PipelineRasterizationDepthClipStateCreateFlagsEXT
impl PartialOrd for PipelineRasterizationStateCreateFlags
impl PartialOrd for PipelineRasterizationStateStreamCreateFlagsEXT
impl PartialOrd for PipelineTessellationStateCreateFlags
impl PartialOrd for PipelineVertexInputStateCreateFlags
impl PartialOrd for PipelineViewportStateCreateFlags
impl PartialOrd for PipelineViewportSwizzleStateCreateFlagsNV
impl PartialOrd for PrivateDataSlot
impl PartialOrd for QueryPool
impl PartialOrd for QueryPoolCreateFlags
impl PartialOrd for Queue
impl PartialOrd for RenderPass
impl PartialOrd for Sampler
impl PartialOrd for SamplerYcbcrConversion
impl PartialOrd for ScreenSurfaceCreateFlagsQNX
impl PartialOrd for Semaphore
impl PartialOrd for ShaderEXT
impl PartialOrd for ShaderModule
impl PartialOrd for StreamDescriptorSurfaceCreateFlagsGGP
impl PartialOrd for SurfaceKHR
impl PartialOrd for SwapchainKHR
impl PartialOrd for ValidationCacheCreateFlagsEXT
impl PartialOrd for ValidationCacheEXT
impl PartialOrd for ViSurfaceCreateFlagsNN
impl PartialOrd for VideoBeginCodingFlagsKHR
impl PartialOrd for VideoDecodeFlagsKHR
impl PartialOrd for VideoEncodeRateControlFlagsKHR
impl PartialOrd for VideoEndCodingFlagsKHR
impl PartialOrd for VideoSessionKHR
impl PartialOrd for VideoSessionParametersCreateFlagsKHR
impl PartialOrd for VideoSessionParametersKHR
impl PartialOrd for WaylandSurfaceCreateFlagsKHR
impl PartialOrd for Win32SurfaceCreateFlagsKHR
impl PartialOrd for XcbSurfaceCreateFlagsKHR
impl PartialOrd for XlibSurfaceCreateFlagsKHR
impl PartialOrd for AccelerationStructureBuildTypeKHR
impl PartialOrd for AccelerationStructureCompatibilityKHR
impl PartialOrd for AccelerationStructureMemoryRequirementsTypeNV
impl PartialOrd for AccelerationStructureMotionInstanceTypeNV
impl PartialOrd for AccelerationStructureTypeKHR
impl PartialOrd for AttachmentLoadOp
impl PartialOrd for AttachmentStoreOp
impl PartialOrd for BlendFactor
impl PartialOrd for BlendOp
impl PartialOrd for BlendOverlapEXT
impl PartialOrd for BlockMatchWindowCompareModeQCOM
impl PartialOrd for BorderColor
impl PartialOrd for BuildAccelerationStructureModeKHR
impl PartialOrd for BuildMicromapModeEXT
impl PartialOrd for ChromaLocation
impl PartialOrd for CoarseSampleOrderTypeNV
impl PartialOrd for ColorSpaceKHR
impl PartialOrd for CommandBufferLevel
impl PartialOrd for CompareOp
impl PartialOrd for ComponentSwizzle
impl PartialOrd for ComponentTypeKHR
impl PartialOrd for ConservativeRasterizationModeEXT
impl PartialOrd for CopyAccelerationStructureModeKHR
impl PartialOrd for CopyMicromapModeEXT
impl PartialOrd for CoverageModulationModeNV
impl PartialOrd for CoverageReductionModeNV
impl PartialOrd for CubicFilterWeightsQCOM
impl PartialOrd for DebugReportObjectTypeEXT
impl PartialOrd for DepthBiasRepresentationEXT
impl PartialOrd for DescriptorType
impl PartialOrd for DescriptorUpdateTemplateType
impl PartialOrd for DeviceAddressBindingTypeEXT
impl PartialOrd for DeviceEventTypeEXT
impl PartialOrd for DeviceFaultAddressTypeEXT
impl PartialOrd for DeviceFaultVendorBinaryHeaderVersionEXT
impl PartialOrd for DeviceMemoryReportEventTypeEXT
impl PartialOrd for DirectDriverLoadingModeLUNARG
impl PartialOrd for DiscardRectangleModeEXT
impl PartialOrd for DisplacementMicromapFormatNV
impl PartialOrd for DisplayEventTypeEXT
impl PartialOrd for DisplayPowerStateEXT
impl PartialOrd for DriverId
impl PartialOrd for DynamicState
impl PartialOrd for Filter
impl PartialOrd for Format
impl PartialOrd for FragmentShadingRateCombinerOpKHR
impl PartialOrd for FragmentShadingRateNV
impl PartialOrd for FragmentShadingRateTypeNV
impl PartialOrd for FrontFace
impl PartialOrd for FullScreenExclusiveEXT
impl PartialOrd for GeometryTypeKHR
impl PartialOrd for ImageLayout
impl PartialOrd for ImageTiling
impl PartialOrd for ImageType
impl PartialOrd for ImageViewType
impl PartialOrd for IndexType
impl PartialOrd for IndirectCommandsTokenTypeNV
impl PartialOrd for InternalAllocationType
impl PartialOrd for LatencyMarkerNV
impl PartialOrd for LayerSettingTypeEXT
impl PartialOrd for LayeredDriverUnderlyingApiMSFT
impl PartialOrd for LineRasterizationModeKHR
impl PartialOrd for LogicOp
impl PartialOrd for MemoryOverallocationBehaviorAMD
impl PartialOrd for MicromapTypeEXT
impl PartialOrd for ObjectType
impl PartialOrd for OpacityMicromapFormatEXT
impl PartialOrd for OpacityMicromapSpecialIndexEXT
impl PartialOrd for OpticalFlowPerformanceLevelNV
impl PartialOrd for OpticalFlowSessionBindingPointNV
impl PartialOrd for OutOfBandQueueTypeNV
impl PartialOrd for PerformanceConfigurationTypeINTEL
impl PartialOrd for PerformanceCounterScopeKHR
impl PartialOrd for PerformanceCounterStorageKHR
impl PartialOrd for PerformanceCounterUnitKHR
impl PartialOrd for PerformanceOverrideTypeINTEL
impl PartialOrd for PerformanceParameterTypeINTEL
impl PartialOrd for PerformanceValueTypeINTEL
impl PartialOrd for PhysicalDeviceType
impl PartialOrd for PipelineBindPoint
impl PartialOrd for PipelineCacheHeaderVersion
impl PartialOrd for PipelineExecutableStatisticFormatKHR
impl PartialOrd for PipelineRobustnessBufferBehaviorEXT
impl PartialOrd for PipelineRobustnessImageBehaviorEXT
impl PartialOrd for PointClippingBehavior
impl PartialOrd for PolygonMode
impl PartialOrd for PresentModeKHR
impl PartialOrd for PrimitiveTopology
impl PartialOrd for ProvokingVertexModeEXT
impl PartialOrd for QueryPoolSamplingModeINTEL
impl PartialOrd for QueryResultStatusKHR
impl PartialOrd for QueryType
impl PartialOrd for QueueGlobalPriorityKHR
impl PartialOrd for RasterizationOrderAMD
impl PartialOrd for RayTracingInvocationReorderModeNV
impl PartialOrd for RayTracingShaderGroupTypeKHR
impl PartialOrd for ash::vk::enums::Result
impl PartialOrd for SamplerAddressMode
impl PartialOrd for SamplerMipmapMode
impl PartialOrd for SamplerReductionMode
impl PartialOrd for SamplerYcbcrModelConversion
impl PartialOrd for SamplerYcbcrRange
impl PartialOrd for ScopeKHR
impl PartialOrd for SemaphoreType
impl PartialOrd for ShaderCodeTypeEXT
impl PartialOrd for ShaderFloatControlsIndependence
impl PartialOrd for ShaderGroupShaderKHR
impl PartialOrd for ShaderInfoTypeAMD
impl PartialOrd for ShadingRatePaletteEntryNV
impl PartialOrd for SharingMode
impl PartialOrd for StencilOp
impl PartialOrd for StructureType
impl PartialOrd for SubpassContents
impl PartialOrd for SubpassMergeStatusEXT
impl PartialOrd for SystemAllocationScope
impl PartialOrd for TessellationDomainOrigin
impl PartialOrd for TimeDomainKHR
impl PartialOrd for ValidationCacheHeaderVersionEXT
impl PartialOrd for ValidationCheckEXT
impl PartialOrd for ValidationFeatureDisableEXT
impl PartialOrd for ValidationFeatureEnableEXT
impl PartialOrd for VendorId
impl PartialOrd for VertexInputRate
impl PartialOrd for VideoEncodeTuningModeKHR
impl PartialOrd for ViewportCoordinateSwizzleNV
impl PartialOrd for Packed24_8
impl PartialOrd for CrossProcessInstant
impl PartialOrd for BlobId
impl PartialOrd for BlobIndex
impl PartialOrd for BroadcastChannelRouterId
impl PartialOrd for BroadcastChannelRouterIndex
impl PartialOrd for BrowsingContextId
impl PartialOrd for BrowsingContextIndex
impl PartialOrd for HistoryStateId
impl PartialOrd for HistoryStateIndex
impl PartialOrd for MessagePortId
impl PartialOrd for MessagePortIndex
impl PartialOrd for MessagePortRouterId
impl PartialOrd for MessagePortRouterIndex
impl PartialOrd for PipelineId
impl PartialOrd for PipelineIndex
impl PartialOrd for PipelineNamespaceId
impl PartialOrd for ServiceWorkerId
impl PartialOrd for ServiceWorkerIndex
impl PartialOrd for ServiceWorkerRegistrationId
impl PartialOrd for ServiceWorkerRegistrationIndex
impl PartialOrd for TopLevelBrowsingContextId
impl PartialOrd for base::Epoch
impl PartialOrd for bytes::bytes::Bytes
impl PartialOrd for BytesMut
impl PartialOrd for calendrical_calculations::chinese_based::Chinese
impl PartialOrd for calendrical_calculations::chinese_based::Dangi
impl PartialOrd for BookHebrew
impl PartialOrd for Moment
impl PartialOrd for RataDie
impl PartialOrd for WebGLContextId
impl PartialOrd for WebGLSLVersion
impl PartialOrd for Months
impl PartialOrd for NaiveDate
impl PartialOrd for NaiveDateDaysIterator
impl PartialOrd for NaiveDateWeeksIterator
impl PartialOrd for NaiveDateTime
impl PartialOrd for IsoWeek
impl PartialOrd for Days
impl PartialOrd for NaiveTime
impl PartialOrd for TimeDelta
impl PartialOrd for SourcePosition
impl PartialOrd for UnknownUnit
impl PartialOrd for Text
impl PartialOrd for FixedBitSet
impl PartialOrd for ByteIndex
impl PartialOrd for Register
impl PartialOrd for DwAccess
impl PartialOrd for DwAddr
impl PartialOrd for DwAt
impl PartialOrd for DwAte
impl PartialOrd for DwCc
impl PartialOrd for DwCfa
impl PartialOrd for DwChildren
impl PartialOrd for DwDefaulted
impl PartialOrd for DwDs
impl PartialOrd for DwDsc
impl PartialOrd for DwEhPe
impl PartialOrd for DwEnd
impl PartialOrd for DwForm
impl PartialOrd for DwId
impl PartialOrd for DwIdx
impl PartialOrd for DwInl
impl PartialOrd for DwLang
impl PartialOrd for DwLle
impl PartialOrd for DwLnct
impl PartialOrd for DwLne
impl PartialOrd for DwLns
impl PartialOrd for DwMacro
impl PartialOrd for DwOp
impl PartialOrd for DwOrd
impl PartialOrd for DwRle
impl PartialOrd for DwSect
impl PartialOrd for DwSectV2
impl PartialOrd for DwTag
impl PartialOrd for DwUt
impl PartialOrd for DwVirtuality
impl PartialOrd for DwVis
impl PartialOrd for ArangeEntry
impl PartialOrd for Range
impl PartialOrd for NativeBuffer
impl PartialOrd for NativeFence
impl PartialOrd for NativeFramebuffer
impl PartialOrd for NativeProgram
impl PartialOrd for NativeQuery
impl PartialOrd for NativeRenderbuffer
impl PartialOrd for NativeSampler
impl PartialOrd for NativeShader
impl PartialOrd for NativeTexture
impl PartialOrd for NativeTransformFeedback
impl PartialOrd for NativeUniformLocation
impl PartialOrd for NativeVertexArray
impl PartialOrd for glow::version::Version
impl PartialOrd for UsageFlags
impl PartialOrd for AllocationFlags
impl PartialOrd for gpu_alloc_types::types::MemoryPropertyFlags
impl PartialOrd for bf16
impl PartialOrd for f16
impl PartialOrd for AccessControlMaxAge
impl PartialOrd for Age
impl PartialOrd for headers::common::date::Date
impl PartialOrd for Expires
impl PartialOrd for headers::common::host::Host
impl PartialOrd for IfModifiedSince
impl PartialOrd for IfUnmodifiedSince
impl PartialOrd for LastModified
impl PartialOrd for Server
impl PartialOrd for UserAgent
impl PartialOrd for HeaderValue
impl PartialOrd for StatusCode
impl PartialOrd for Authority
Case-insensitive ordering
§Examples
let authority: Authority = "DEF.com".parse().unwrap();
assert!(authority < "ghi.com");
assert!(authority > "abc.com");
impl PartialOrd for PathAndQuery
impl PartialOrd for http::version::Version
impl PartialOrd for HttpDate
impl PartialOrd for ReasonPhrase
impl PartialOrd for icu_calendar::chinese::Chinese
impl PartialOrd for ChineseDateInner
impl PartialOrd for Coptic
impl PartialOrd for CopticDateInner
impl PartialOrd for icu_calendar::dangi::Dangi
impl PartialOrd for DangiDateInner
impl PartialOrd for Ethiopian
impl PartialOrd for EthiopianDateInner
impl PartialOrd for GregorianDateInner
impl PartialOrd for Hebrew
impl PartialOrd for HebrewDateInner
impl PartialOrd for Indian
impl PartialOrd for IndianDateInner
impl PartialOrd for IslamicCivil
impl PartialOrd for IslamicCivilDateInner
impl PartialOrd for IslamicDateInner
impl PartialOrd for IslamicTabular
impl PartialOrd for IslamicTabularDateInner
impl PartialOrd for IslamicUmmAlQuraDateInner
impl PartialOrd for Iso
impl PartialOrd for IsoDateInner
impl PartialOrd for JapaneseDateInner
impl PartialOrd for Julian
impl PartialOrd for Persian
impl PartialOrd for PersianDateInner
impl PartialOrd for PackedChineseBasedYearInfo
impl PartialOrd for PackedIslamicYearInfo
impl PartialOrd for EraStartDate
impl PartialOrd for EraStartDateULE
impl PartialOrd for RocDateInner
impl PartialOrd for IsoHour
impl PartialOrd for IsoMinute
impl PartialOrd for IsoSecond
impl PartialOrd for MonthCode
impl PartialOrd for NanoSecond
impl PartialOrd for icu_calendar::types::Time
impl PartialOrd for Field
impl PartialOrd for FieldULE
impl PartialOrd for DayPeriodULE
impl PartialOrd for DayULE
impl PartialOrd for HourULE
impl PartialOrd for MonthULE
impl PartialOrd for SecondULE
impl PartialOrd for TimeZoneULE
impl PartialOrd for WeekULE
impl PartialOrd for WeekdayULE
impl PartialOrd for YearULE
impl PartialOrd for Other
impl PartialOrd for icu_locid::extensions::other::subtag::Subtag
impl PartialOrd for icu_locid::extensions::private::other::Subtag
impl PartialOrd for Private
impl PartialOrd for Fields
impl PartialOrd for icu_locid::extensions::transform::key::Key
impl PartialOrd for icu_locid::extensions::transform::value::Value
impl PartialOrd for icu_locid::extensions::unicode::attribute::Attribute
impl PartialOrd for Attributes
impl PartialOrd for icu_locid::extensions::unicode::key::Key
impl PartialOrd for Keywords
impl PartialOrd for Unicode
impl PartialOrd for icu_locid::extensions::unicode::value::Value
impl PartialOrd for Language
impl PartialOrd for Region
impl PartialOrd for icu_locid::subtags::script::Script
impl PartialOrd for Variant
impl PartialOrd for Variants
impl PartialOrd for LanguageStrStrPairVarULE
impl PartialOrd for StrStrPairVarULE
impl PartialOrd for PluralCategoryULE
impl PartialOrd for BidiClass
impl PartialOrd for CanonicalCombiningClass
impl PartialOrd for EastAsianWidth
impl PartialOrd for GraphemeClusterBreak
impl PartialOrd for HangulSyllableType
impl PartialOrd for IndicSyllabicCategory
impl PartialOrd for JoiningType
impl PartialOrd for LineBreak
impl PartialOrd for icu_properties::props::Script
impl PartialOrd for SentenceBreak
impl PartialOrd for WordBreak
impl PartialOrd for CheckedBidiPairedBracketTypeULE
impl PartialOrd for NormalizedPropertyNameStr
The Ord/PartialOrd impl will sort things using strict equality, but in such a way that all loose-equal items will sort into the same area, such that a map can be searched for both strict and loose equality.
impl PartialOrd for DataKey
impl PartialOrd for DataKeyHash
impl PartialOrd for DataKeyMetadata
impl PartialOrd for DataKeyPath
impl PartialOrd for AuxiliaryKeys
impl PartialOrd for DataRequestMetadata
impl PartialOrd for MetazoneId
impl PartialOrd for TimeZoneBcp47Id
impl PartialOrd for ZoneVariant
impl PartialOrd for Delay
impl PartialOrd for Modifiers
impl PartialOrd for markup5ever::interface::Attribute
impl PartialOrd for QualName
impl PartialOrd for LocalNameStaticSet
impl PartialOrd for NamespaceStaticSet
impl PartialOrd for PrefixStaticSet
impl PartialOrd for Mime
impl PartialOrd for Interest
impl PartialOrd for Token
impl PartialOrd for naga::proc::layouter::Alignment
impl PartialOrd for EarlyDepthTest
impl PartialOrd for RayFlag
impl PartialOrd for ResourceBinding
impl PartialOrd for Scalar
impl PartialOrd for StorageAccess
impl PartialOrd for Quality
impl PartialOrd for petgraph::visit::dfsvisit::Time
impl PartialOrd for NegativeHemisphereError
impl PartialOrd for Transformations
impl PartialOrd for TimerMetadata
impl PartialOrd for LazyStateID
impl PartialOrd for Unit
impl PartialOrd for regex_automata::util::id::PatternID
impl PartialOrd for NonMaxUsize
impl PartialOrd for regex_automata::util::primitives::PatternID
impl PartialOrd for SmallIndex
impl PartialOrd for regex_automata::util::primitives::StateID
impl PartialOrd for Position
impl PartialOrd for Span
impl PartialOrd for regex_syntax::hir::literal::Literal
impl PartialOrd for ClassBytesRange
impl PartialOrd for ClassUnicodeRange
impl PartialOrd for Utf8Range
impl PartialOrd for Extensions
impl PartialOrd for Float
Partial ordering comparison
In order to be able to use Number
as a mapping key, NaN floating values
wrapped in Number
are equal to each other and are less then any other
floating value. It is not the case for the underlying f64
values
themselves.
use ron::value::Number;
assert!(Number::new(std::f64::NAN) < Number::new(std::f64::NEG_INFINITY));
assert_eq!(Number::new(std::f64::NAN), Number::new(std::f64::NAN));
impl PartialOrd for Map
impl PartialOrd for SocketAddrUnix
impl PartialOrd for Opcode
impl PartialOrd for SockaddrXdpFlags
impl PartialOrd for SocketAddrXdp
impl PartialOrd for Certificate
impl PartialOrd for GamepadIndex
impl PartialOrd for AtomStaticSet
impl PartialOrd for Tick
impl PartialOrd for InputPort
impl PartialOrd for NodeId
impl PartialOrd for OutputPort
impl PartialOrd for ServoUrl
impl PartialOrd for EmptyStaticAtomSet
impl PartialOrd for CascadePriority
impl PartialOrd for ScopeProximity
impl PartialOrd for ShadowCascadeOrder
impl PartialOrd for KeyframePercentage
impl PartialOrd for LayerOrder
impl PartialOrd for ContainerConditionId
impl PartialOrd for LayerId
impl PartialOrd for ScopeConditionId
impl PartialOrd for style::values::computed::angle::Angle
impl PartialOrd for Zoom
impl PartialOrd for FontStretch
impl PartialOrd for FontStyle
impl PartialOrd for FontWeight
impl PartialOrd for CSSPixelLength
impl PartialOrd for Percentage
impl PartialOrd for style::values::computed::time::Time
impl PartialOrd for Ratio<NonNegative<f32>>
impl PartialOrd for Integer
impl PartialOrd for style::values::specified::Number
impl PartialOrd for Opacity
impl PartialOrd for time::date::Date
impl PartialOrd for time::duration::Duration
impl PartialOrd for time::duration::Duration
impl PartialOrd for time::instant::Instant
impl PartialOrd for OffsetDateTime
impl PartialOrd for PrimitiveDateTime
impl PartialOrd for SteadyTime
impl PartialOrd for Timespec
impl PartialOrd for Tm
impl PartialOrd for time::time::Time
impl PartialOrd for UtcOffset
impl PartialOrd for Ready
impl PartialOrd for tokio::time::instant::Instant
impl PartialOrd for AnyDelimiterCodec
impl PartialOrd for BytesCodec
impl PartialOrd for LinesCodec
impl PartialOrd for tracing_core::metadata::Level
impl PartialOrd for tracing_core::metadata::LevelFilter
impl PartialOrd for ATerm
impl PartialOrd for B0
impl PartialOrd for B1
impl PartialOrd for Z0
impl PartialOrd for Equal
impl PartialOrd for Greater
impl PartialOrd for Less
impl PartialOrd for UTerm
impl PartialOrd for unicode_bidi::level::Level
impl PartialOrd for Url
URLs compare like their serialization.
impl PartialOrd for Braced
impl PartialOrd for Hyphenated
impl PartialOrd for Simple
impl PartialOrd for Urn
impl PartialOrd for Uuid
impl PartialOrd for WebGPUContextId
impl PartialOrd for webpki::time::Time
impl PartialOrd for TileId
impl PartialOrd for CaptureBits
impl PartialOrd for ClearCache
impl PartialOrd for ShaderPrecacheFlags
impl PartialOrd for ColorU
impl PartialOrd for PremultipliedColorF
impl PartialOrd for PrimitiveFlags
impl PartialOrd for StackingContextFlags
impl PartialOrd for FontInstanceFlags
impl PartialOrd for FontInstanceKey
impl PartialOrd for FontInstanceOptions
impl PartialOrd for FontInstancePlatformOptions
impl PartialOrd for FontKey
impl PartialOrd for FontSize
impl PartialOrd for FontVariation
impl PartialOrd for GlyphOptions
impl PartialOrd for NativeFontHandle
impl PartialOrd for SyntheticItalics
impl PartialOrd for ImageDescriptorFlags
impl PartialOrd for DebugFlags
impl PartialOrd for webrender_api::Epoch
impl PartialOrd for FramePublishId
impl PartialOrd for IdNamespace
impl PartialOrd for RenderReasons
impl PartialOrd for DevicePixel
impl PartialOrd for FramebufferPixel
impl PartialOrd for LayoutPixel
impl PartialOrd for PicturePixel
impl PartialOrd for RasterPixel
impl PartialOrd for Tiles
impl PartialOrd for WorldPixel
impl PartialOrd for ShaderFeatureFlags
impl PartialOrd for RawId
impl PartialOrd for DownlevelCapabilities
impl PartialOrd for DownlevelFlags
impl PartialOrd for DownlevelLimits
impl PartialOrd for PresentationTimestamp
impl PartialOrd for BaseFontInstance
impl PartialOrd for FontInstance
impl PartialOrd for FontTransform
impl PartialOrd for GlyphKey
impl PartialOrd for CharULE
impl PartialOrd for UnvalidatedChar
impl PartialOrd for UnvalidatedStr
impl PartialOrd for Index16
impl PartialOrd for Index32
impl PartialOrd for TextPoint
impl PartialOrd for UTF8Bytes
impl PartialOrd for UTF16CodeUnits
impl PartialOrd for JsTimerHandle
impl PartialOrd for OneshotTimer
impl PartialOrd for OneshotTimerHandle
impl PartialOrd for BoundaryPoint
impl PartialOrd for ResizeObservationDepth
impl PartialOrd for DOMString
impl PartialOrd for USVString
impl PartialOrd for script::dom::bindings::import::base::ptr::Alignment
impl PartialOrd for CString
impl PartialOrd for String
impl PartialOrd for TypeId
impl PartialOrd for CpuidResult
impl PartialOrd for CStr
impl PartialOrd for core::fmt::Error
impl PartialOrd for PhantomPinned
impl PartialOrd for Ipv4Addr
impl PartialOrd for Ipv6Addr
impl PartialOrd for SocketAddrV4
impl PartialOrd for SocketAddrV6
impl PartialOrd for core::time::Duration
impl PartialOrd for OsStr
impl PartialOrd for OsString
impl PartialOrd for Path
impl PartialOrd for PathBuf
impl PartialOrd for std::time::Instant
impl PartialOrd for SystemTime
impl PartialOrd<Level> for log::LevelFilter
impl PartialOrd<LevelFilter> for log::Level
impl PartialOrd<IpAddr> for Ipv4Addr
impl PartialOrd<IpAddr> for Ipv6Addr
impl PartialOrd<str> for bytes::bytes::Bytes
impl PartialOrd<str> for BytesMut
impl PartialOrd<str> for HeaderValue
impl PartialOrd<str> for Authority
impl PartialOrd<str> for PathAndQuery
impl PartialOrd<str> for OsStr
impl PartialOrd<str> for OsString
impl PartialOrd<Bytes> for &str
impl PartialOrd<Bytes> for &[u8]
impl PartialOrd<Bytes> for str
impl PartialOrd<Bytes> for String
impl PartialOrd<Bytes> for Vec<u8>
impl PartialOrd<Bytes> for [u8]
impl PartialOrd<BytesMut> for &str
impl PartialOrd<BytesMut> for &[u8]
impl PartialOrd<BytesMut> for str
impl PartialOrd<BytesMut> for String
impl PartialOrd<BytesMut> for Vec<u8>
impl PartialOrd<BytesMut> for [u8]
impl PartialOrd<HeaderValue> for str
impl PartialOrd<HeaderValue> for String
impl PartialOrd<HeaderValue> for [u8]
impl PartialOrd<Authority> for str
impl PartialOrd<Authority> for String
impl PartialOrd<PathAndQuery> for str
impl PartialOrd<PathAndQuery> for String
impl PartialOrd<Duration> for core::time::Duration
impl PartialOrd<Instant> for std::time::Instant
impl PartialOrd<OffsetDateTime> for SystemTime
impl PartialOrd<Level> for tracing_core::metadata::LevelFilter
impl PartialOrd<LevelFilter> for tracing_core::metadata::Level
impl PartialOrd<String> for bytes::bytes::Bytes
impl PartialOrd<String> for BytesMut
impl PartialOrd<String> for HeaderValue
impl PartialOrd<String> for Authority
impl PartialOrd<String> for PathAndQuery
impl PartialOrd<Vec<u8>> for bytes::bytes::Bytes
impl PartialOrd<Vec<u8>> for BytesMut
impl PartialOrd<Ipv4Addr> for IpAddr
impl PartialOrd<Ipv6Addr> for IpAddr
impl PartialOrd<Duration> for time::duration::Duration
impl PartialOrd<OsStr> for Path
impl PartialOrd<OsStr> for PathBuf
impl PartialOrd<OsString> for Path
impl PartialOrd<OsString> for PathBuf
impl PartialOrd<Path> for OsStr
impl PartialOrd<Path> for OsString
impl PartialOrd<Path> for PathBuf
impl PartialOrd<PathBuf> for OsStr
impl PartialOrd<PathBuf> for OsString
impl PartialOrd<PathBuf> for Path
impl PartialOrd<Instant> for time::instant::Instant
impl PartialOrd<SystemTime> for OffsetDateTime
impl PartialOrd<[u8]> for bytes::bytes::Bytes
impl PartialOrd<[u8]> for BytesMut
impl PartialOrd<[u8]> for HeaderValue
impl<'a> PartialOrd for FlexZeroVec<'a>
impl<'a> PartialOrd for Component<'a>
impl<'a> PartialOrd for Prefix<'a>
impl<'a> PartialOrd for Codepoint<'a>
impl<'a> PartialOrd for LanguageStrStrPair<'a>
impl<'a> PartialOrd for StrStrPair<'a>
impl<'a> PartialOrd for Metadata<'a>
impl<'a> PartialOrd for MetadataBuilder<'a>
impl<'a> PartialOrd for Name<'a>
impl<'a> PartialOrd for Location<'a>
impl<'a> PartialOrd for Components<'a>
impl<'a> PartialOrd for PrefixComponent<'a>
impl<'a> PartialOrd<&'a str> for Authority
impl<'a> PartialOrd<&'a str> for PathAndQuery
impl<'a> PartialOrd<&'a OsStr> for Path
impl<'a> PartialOrd<&'a OsStr> for PathBuf
impl<'a> PartialOrd<&'a Path> for OsStr
impl<'a> PartialOrd<&'a Path> for OsString
impl<'a> PartialOrd<&'a Path> for PathBuf
impl<'a> PartialOrd<Cow<'a, OsStr>> for Path
impl<'a> PartialOrd<Cow<'a, OsStr>> for PathBuf
impl<'a> PartialOrd<Cow<'a, Path>> for OsStr
impl<'a> PartialOrd<Cow<'a, Path>> for OsString
impl<'a> PartialOrd<Cow<'a, Path>> for Path
impl<'a> PartialOrd<Cow<'a, Path>> for PathBuf
impl<'a> PartialOrd<HeaderValue> for &'a str
impl<'a> PartialOrd<HeaderValue> for &'a HeaderValue
impl<'a> PartialOrd<Authority> for &'a str
impl<'a> PartialOrd<PathAndQuery> for &'a str
impl<'a> PartialOrd<OsStr> for &'a Path
impl<'a> PartialOrd<OsStr> for Cow<'a, Path>
impl<'a> PartialOrd<OsString> for &'a Path
impl<'a> PartialOrd<OsString> for Cow<'a, Path>
impl<'a> PartialOrd<Path> for &'a OsStr
impl<'a> PartialOrd<Path> for Cow<'a, OsStr>
impl<'a> PartialOrd<Path> for Cow<'a, Path>
impl<'a> PartialOrd<PathBuf> for &'a OsStr
impl<'a> PartialOrd<PathBuf> for &'a Path
impl<'a> PartialOrd<PathBuf> for Cow<'a, OsStr>
impl<'a> PartialOrd<PathBuf> for Cow<'a, Path>
impl<'a, 'b> PartialOrd<&'a OsStr> for OsString
impl<'a, 'b> PartialOrd<&'a Path> for Cow<'b, OsStr>
impl<'a, 'b> PartialOrd<&'b OsStr> for Cow<'a, OsStr>
impl<'a, 'b> PartialOrd<&'b OsStr> for Cow<'a, Path>
impl<'a, 'b> PartialOrd<&'b Path> for Cow<'a, Path>
impl<'a, 'b> PartialOrd<Cow<'a, OsStr>> for &'b OsStr
impl<'a, 'b> PartialOrd<Cow<'a, OsStr>> for OsStr
impl<'a, 'b> PartialOrd<Cow<'a, OsStr>> for OsString
impl<'a, 'b> PartialOrd<Cow<'a, Path>> for &'b OsStr
impl<'a, 'b> PartialOrd<Cow<'a, Path>> for &'b Path
impl<'a, 'b> PartialOrd<Cow<'b, OsStr>> for &'a Path
impl<'a, 'b> PartialOrd<OsStr> for Cow<'a, OsStr>
impl<'a, 'b> PartialOrd<OsStr> for OsString
impl<'a, 'b> PartialOrd<OsString> for &'a OsStr
impl<'a, 'b> PartialOrd<OsString> for Cow<'a, OsStr>
impl<'a, 'b> PartialOrd<OsString> for OsStr
impl<'a, B> PartialOrd for Cow<'a, B>
impl<'a, T> PartialOrd for ZeroVec<'a, T>where
T: AsULE + PartialOrd,
impl<'a, T> PartialOrd<&'a T> for bytes::bytes::Bytes
impl<'a, T> PartialOrd<&'a T> for BytesMut
impl<'a, T> PartialOrd<&'a T> for HeaderValue
impl<'a, T> PartialOrd<T> for CowRcStr<'a>
impl<'a, T, F> PartialOrd for VarZeroVec<'a, T, F>
impl<'b, T> PartialOrd for Ptr<'b, T>
impl<A> PartialOrd for SmallVec<A>
impl<A, B> PartialOrd for Tuple2ULE<A, B>
impl<A, B> PartialOrd<&B> for &A
impl<A, B> PartialOrd<&mut B> for &mut A
impl<A, B, C> PartialOrd for Tuple3ULE<A, B, C>
impl<A, B, C, D> PartialOrd for Tuple4ULE<A, B, C, D>
impl<A, B, C, D, E> PartialOrd for Tuple5ULE<A, B, C, D, E>where
A: PartialOrd + ULE,
B: PartialOrd + ULE,
C: PartialOrd + ULE,
D: PartialOrd + ULE,
E: PartialOrd + ULE,
impl<A, B, C, D, E, F> PartialOrd for Tuple6ULE<A, B, C, D, E, F>where
A: PartialOrd + ULE,
B: PartialOrd + ULE,
C: PartialOrd + ULE,
D: PartialOrd + ULE,
E: PartialOrd + ULE,
F: PartialOrd + ULE,
impl<B> PartialOrd for BitSet<B>where
B: BitBlock,
impl<B> PartialOrd for BitVec<B>where
B: BitBlock,
impl<C, A, B> PartialOrd<Date<B>> for icu_calendar::date::Date<A>where
C: Calendar,
<C as Calendar>::DateInner: PartialOrd,
A: AsCalendar<Calendar = C>,
B: AsCalendar<Calendar = C>,
impl<C, A, B> PartialOrd<DateTime<B>> for icu_calendar::datetime::DateTime<A>where
C: Calendar,
<C as Calendar>::DateInner: PartialOrd,
A: AsCalendar<Calendar = C>,
B: AsCalendar<Calendar = C>,
impl<Dyn> PartialOrd for DynMetadata<Dyn>where
Dyn: ?Sized,
impl<E> PartialOrd for I16Bytes<E>where
E: PartialOrd + Endian,
impl<E> PartialOrd for I32Bytes<E>where
E: PartialOrd + Endian,
impl<E> PartialOrd for I64Bytes<E>where
E: PartialOrd + Endian,
impl<E> PartialOrd for U16Bytes<E>where
E: PartialOrd + Endian,
impl<E> PartialOrd for U32Bytes<E>where
E: PartialOrd + Endian,
impl<E> PartialOrd for U64Bytes<E>where
E: PartialOrd + Endian,
impl<F> PartialOrd for Fwhere
F: FnPtr,
impl<F, A> PartialOrd for Tendril<F, A>
impl<Ix> PartialOrd for EdgeIndex<Ix>where
Ix: PartialOrd,
impl<Ix> PartialOrd for NodeIndex<Ix>where
Ix: PartialOrd,
impl<K, V> PartialOrd for indexmap::map::slice::Slice<K, V>where
K: PartialOrd,
V: PartialOrd,
impl<K, V, A> PartialOrd for BTreeMap<K, V, A>
impl<K, V, S> PartialOrd for LiteMap<K, V, S>
impl<Kind> PartialOrd for PortIndex<Kind>where
Kind: PartialOrd + PortKind,
<Kind as PortKind>::ParamId: PartialOrd,
<Kind as PortKind>::Listener: PartialOrd,
impl<Kind> PartialOrd for PortId<Kind>where
Kind: PartialOrd + PortKind,
impl<L, R> PartialOrd for Either<L, R>where
L: PartialOrd,
R: PartialOrd,
impl<Ptr, Q> PartialOrd<Pin<Q>> for Pin<Ptr>
impl<Rhs> PartialOrd<Rhs> for ByteBuf
impl<Rhs> PartialOrd<Rhs> for serde_bytes::bytes::Bytes
impl<Rhs, const N: usize> PartialOrd<Rhs> for ByteArray<N>
impl<S> PartialOrd for url::host::Host<S>where
S: PartialOrd,
impl<Static> PartialOrd for Atom<Static>where
Static: StaticAtomSet,
impl<Storage> PartialOrd for ash::vk::native::__BindgenBitfieldUnit<Storage>where
Storage: PartialOrd,
impl<Storage> PartialOrd for linux_raw_sys::general::__BindgenBitfieldUnit<Storage>where
Storage: PartialOrd,
impl<Storage> PartialOrd for linux_raw_sys::net::__BindgenBitfieldUnit<Storage>where
Storage: PartialOrd,
impl<Storage> PartialOrd for mozangle::shaders::ffi::__BindgenBitfieldUnit<Storage>where
Storage: PartialOrd,
impl<Storage> PartialOrd for script::dom::bindings::import::module::jsapi::__BindgenBitfieldUnit<Storage>where
Storage: PartialOrd,
impl<T> PartialOrd for UnitSectionOffset<T>where
T: PartialOrd,
impl<T> PartialOrd for Option<T>where
T: PartialOrd,
impl<T> PartialOrd for Poll<T>where
T: PartialOrd,
impl<T> PartialOrd for *const Twhere
T: ?Sized,
impl<T> PartialOrd for *mut Twhere
T: ?Sized,
impl<T> PartialOrd for [T]where
T: PartialOrd,
Implements comparison of slices lexicographically.
impl<T> PartialOrd for (T₁, T₂, …, Tₙ)where
T: PartialOrd + ?Sized,
This trait is implemented for tuples up to twelve items long.
impl<T> PartialOrd for CapacityError<T>where
T: PartialOrd,
impl<T> PartialOrd for AtomicRefCell<T>where
T: PartialOrd + ?Sized,
impl<T> PartialOrd for euclid::angle::Angle<T>where
T: PartialOrd,
impl<T> PartialOrd for AllowStdIo<T>where
T: PartialOrd,
impl<T> PartialOrd for DebugInfoOffset<T>where
T: PartialOrd,
impl<T> PartialOrd for DebugTypesOffset<T>where
T: PartialOrd,
impl<T> PartialOrd for UnitOffset<T>where
T: PartialOrd,
impl<T> PartialOrd for indexmap::set::slice::Slice<T>where
T: PartialOrd,
impl<T> PartialOrd for Handle<T>
impl<T> PartialOrd for servo_arc::Arc<T>where
T: PartialOrd + ?Sized,
impl<T> PartialOrd for GreaterThanOrEqualToOne<T>where
T: PartialOrd,
impl<T> PartialOrd for NonNegative<T>where
T: PartialOrd,
impl<T> PartialOrd for ZeroToOne<T>where
T: PartialOrd,
impl<T> PartialOrd for ThinVec<T>where
T: PartialOrd,
impl<T> PartialOrd for Ascii<T>
impl<T> PartialOrd for UniCase<T>
impl<T> PartialOrd for Id<T>where
T: Marker,
impl<T> PartialOrd for TryWriteableInfallibleAsWriteable<T>where
T: PartialOrd,
impl<T> PartialOrd for WriteableAsTryWriteableInfallible<T>where
T: PartialOrd,
impl<T> PartialOrd for Unalign<T>where
T: Unaligned + PartialOrd,
impl<T> PartialOrd for ZeroSlice<T>where
T: AsULE + PartialOrd,
impl<T> PartialOrd for RefCell<T>where
T: PartialOrd + ?Sized,
impl<T> PartialOrd for NonNull<T>where
T: ?Sized,
impl<T> PartialOrd for Cell<T>where
T: PartialOrd + Copy,
impl<T> PartialOrd for PhantomData<T>where
T: ?Sized,
impl<T> PartialOrd for ManuallyDrop<T>where
T: PartialOrd + ?Sized,
impl<T> PartialOrd for NonZero<T>where
T: ZeroablePrimitive + PartialOrd,
impl<T> PartialOrd for Saturating<T>where
T: PartialOrd,
impl<T> PartialOrd for Wrapping<T>where
T: PartialOrd,
impl<T> PartialOrd for Reverse<T>where
T: PartialOrd,
impl<T> PartialOrd<T> for void::Void
impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
Implements comparison of vectors, lexicographically.
impl<T, A> PartialOrd for Rc<T, A>
impl<T, A> PartialOrd for Box<T, A>
impl<T, A> PartialOrd for BTreeSet<T, A>
impl<T, A> PartialOrd for LinkedList<T, A>where
T: PartialOrd,
A: Allocator,
impl<T, A> PartialOrd for VecDeque<T, A>where
T: PartialOrd,
A: Allocator,
impl<T, A> PartialOrd for alloc::sync::Arc<T, A>
impl<T, B> PartialOrd for Ref<B, [T]>
impl<T, B> PartialOrd for Ref<B, T>
impl<T, E> PartialOrd for core::result::Result<T, E>where
T: PartialOrd,
E: PartialOrd,
impl<T, F> PartialOrd for VarZeroSlice<T, F>
impl<T, N> PartialOrd for GenericArray<T, N>where
T: PartialOrd,
N: ArrayLength<T>,
impl<T, Src, Dst> PartialOrd for Scale<T, Src, Dst>where
T: PartialOrd,
impl<T, U> PartialOrd for Length<T, U>where
T: PartialOrd,
impl<T, const CAP: usize> PartialOrd for ArrayVec<T, CAP>where
T: PartialOrd,
impl<T, const FRACTION_BITS: u16> PartialOrd for FixedPoint<T, FRACTION_BITS>where
T: PartialOrd,
impl<T, const N: usize> PartialOrd for [T; N]where
T: PartialOrd,
Implements comparison of arrays lexicographically.