pub enum DispatchKey {
Text(Arc<str>),
Rational(RationalInteger),
Date(NaiveDateTime),
Time(NaiveDateTime),
}Expand description
One breakpoint in an ordered dispatch table.
Deliberately implements neither Ord nor PartialOrd. RationalInteger’s
Ord panics when the cross-multiplication needed to order two rationals runs
out of memory, while evaluation must turn that failure into a veto. Ordering
therefore goes through Self::try_compare, which surfaces the failure.
Text stays Arc<str>: planning clones dispatch tables through the cons key,
extract_reachable, and PlanView merges, so a shared string is one refcount
bump per clone where an owned one is an allocation per clone (measured 10%
slower load on the 126000 logistics fixture).
Variants§
Text(Arc<str>)
Rational(RationalInteger)
Stored magnitude of a number, ratio or measure. Measure magnitudes are held in canonical base-unit space, which is why one key covers all three.
Date(NaiveDateTime)
Time(NaiveDateTime)
Trait Implementations§
Source§impl Clone for DispatchKey
impl Clone for DispatchKey
Source§impl Debug for DispatchKey
impl Debug for DispatchKey
impl Eq for DispatchKey
Source§impl Hash for DispatchKey
impl Hash for DispatchKey
Source§impl PartialEq for DispatchKey
impl PartialEq for DispatchKey
impl StructuralPartialEq for DispatchKey
Auto Trait Implementations§
impl Forget for DispatchKey
impl Freeze for DispatchKey
impl Move for DispatchKey
impl RefUnwindSafe for DispatchKey
impl Send for DispatchKey
impl Sync for DispatchKey
impl Unpin for DispatchKey
impl UnsafeUnpin for DispatchKey
impl UnwindSafe for DispatchKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.