pub enum Key<'x, P: Property> {
Property(P),
Borrowed(&'x str),
Owned(String),
}
Variants§
Implementations§
Source§impl<P: Property> Key<'_, P>
impl<P: Property> Key<'_, P>
pub fn to_string(&self) -> Cow<'_, str>
pub fn into_string(self) -> String
pub fn try_into_property(self) -> Option<P>
pub fn into_owned(self) -> Key<'static, P>
pub fn to_owned(&self) -> Key<'static, P>
pub fn as_property(&self) -> Option<&P>
pub fn as_string_key(&self) -> Option<&str>
Trait Implementations§
Source§impl<'x, P: Ord + Property> Ord for Key<'x, P>
impl<'x, P: Ord + Property> Ord for Key<'x, P>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'x, P: PartialOrd + Property> PartialOrd for Key<'x, P>
impl<'x, P: PartialOrd + Property> PartialOrd for Key<'x, P>
impl<P: Property> Eq for Key<'_, P>
Auto Trait Implementations§
impl<'x, P> Freeze for Key<'x, P>where
P: Freeze,
impl<'x, P> RefUnwindSafe for Key<'x, P>where
P: RefUnwindSafe,
impl<'x, P> Send for Key<'x, P>where
P: Send,
impl<'x, P> Sync for Key<'x, P>where
P: Sync,
impl<'x, P> Unpin for Key<'x, P>where
P: Unpin,
impl<'x, P> UnwindSafe for Key<'x, P>where
P: UnwindSafe,
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
Mutably borrows from an owned value. Read more