Trait copse::default::OrdStoredKey
source · pub trait OrdStoredKey: SortableBy<OrdTotalOrder<Self::OrdKeyType>> {
type OrdKeyType: ?Sized + Ord;
}
Expand description
A helper trait implemented on potential storage key types, used to identify their default
comparison type for Ord
-based comparisons.
This is only really used when collections are left to select the default OrdTotalOrder
total order, which essentially converts copse’s collections into those already provided by
the standard library. This trait is therefore a convenience, but of relatively little value.
For example, a collection that stores String
under the default total order will use
str
as the comparison type owing to the implementation of this trait for String
.
Required Associated Types§
sourcetype OrdKeyType: ?Sized + Ord
type OrdKeyType: ?Sized + Ord
The comparison type to be used by collections storing keys of Self
type and using the
default OrdTotalOrder
total order.
Implementations on Foreign Types§
source§impl OrdStoredKey for ()
impl OrdStoredKey for ()
type OrdKeyType = ()
source§impl OrdStoredKey for bool
impl OrdStoredKey for bool
type OrdKeyType = bool
source§impl OrdStoredKey for char
impl OrdStoredKey for char
type OrdKeyType = char
source§impl OrdStoredKey for i8
impl OrdStoredKey for i8
type OrdKeyType = i8
source§impl OrdStoredKey for u8
impl OrdStoredKey for u8
type OrdKeyType = u8
source§impl OrdStoredKey for i16
impl OrdStoredKey for i16
type OrdKeyType = i16
source§impl OrdStoredKey for u16
impl OrdStoredKey for u16
type OrdKeyType = u16
source§impl OrdStoredKey for i32
impl OrdStoredKey for i32
type OrdKeyType = i32
source§impl OrdStoredKey for u32
impl OrdStoredKey for u32
type OrdKeyType = u32
source§impl OrdStoredKey for i64
impl OrdStoredKey for i64
type OrdKeyType = i64
source§impl OrdStoredKey for u64
impl OrdStoredKey for u64
type OrdKeyType = u64
source§impl OrdStoredKey for i128
impl OrdStoredKey for i128
type OrdKeyType = i128
source§impl OrdStoredKey for u128
impl OrdStoredKey for u128
type OrdKeyType = u128
source§impl OrdStoredKey for isize
impl OrdStoredKey for isize
type OrdKeyType = isize
source§impl OrdStoredKey for usize
impl OrdStoredKey for usize
type OrdKeyType = usize
source§impl OrdStoredKey for String
impl OrdStoredKey for String
type OrdKeyType = str
source§impl OrdStoredKey for str
impl OrdStoredKey for str
type OrdKeyType = str
source§impl OrdStoredKey for CString
impl OrdStoredKey for CString
type OrdKeyType = CStr
source§impl OrdStoredKey for CStr
impl OrdStoredKey for CStr
type OrdKeyType = CStr
source§impl<B: ?Sized + Ord + Clone> OrdStoredKey for Cow<'_, B>
impl<B: ?Sized + Ord + Clone> OrdStoredKey for Cow<'_, B>
type OrdKeyType = B
source§impl<T: ?Sized + Ord> OrdStoredKey for &T
impl<T: ?Sized + Ord> OrdStoredKey for &T
type OrdKeyType = T
source§impl<T: ?Sized + Ord> OrdStoredKey for &mut T
impl<T: ?Sized + Ord> OrdStoredKey for &mut T
type OrdKeyType = T
source§impl<T: ?Sized + Ord> OrdStoredKey for Rc<T>
impl<T: ?Sized + Ord> OrdStoredKey for Rc<T>
type OrdKeyType = T
source§impl<T: ?Sized + Ord> OrdStoredKey for Arc<T>
impl<T: ?Sized + Ord> OrdStoredKey for Arc<T>
type OrdKeyType = T
source§impl<T: Ord, const N: usize> OrdStoredKey for [T; N]
impl<T: Ord, const N: usize> OrdStoredKey for [T; N]
type OrdKeyType = [T]
source§impl<T: Ord> OrdStoredKey for [T]
impl<T: Ord> OrdStoredKey for [T]
type OrdKeyType = [T]
source§impl OrdStoredKey for OsString
Available on crate feature std
only.
impl OrdStoredKey for OsString
Available on crate feature
std
only.type OrdKeyType = OsStr
source§impl OrdStoredKey for OsStr
Available on crate feature std
only.
impl OrdStoredKey for OsStr
Available on crate feature
std
only.type OrdKeyType = OsStr
source§impl OrdStoredKey for PathBuf
Available on crate feature std
only.
impl OrdStoredKey for PathBuf
Available on crate feature
std
only.type OrdKeyType = Path
source§impl OrdStoredKey for Path
Available on crate feature std
only.
impl OrdStoredKey for Path
Available on crate feature
std
only.