pub enum Soo<T>where
T: ToOwned + ?Sized + 'static,{
Static(&'static T),
Owned(T::Owned),
}Variants§
Static(&'static T)
Owned(T::Owned)
Trait Implementations§
source§impl AsRefToString for Soo<str>
impl AsRefToString for Soo<str>
fn as_ref_to_string(self) -> Soo<str>
source§impl<'a, T> Deserialize<'a> for Soo<T>where
T: ToOwned + ?Sized + 'static,
&'a T: Deserialize<'a>,
impl<'a, T> Deserialize<'a> for Soo<T>where T: ToOwned + ?Sized + 'static, &'a T: Deserialize<'a>,
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T> From<&'static T> for Soo<T>where
T: ToOwned + ?Sized + 'static,
impl<T> From<&'static T> for Soo<T>where T: ToOwned + ?Sized + 'static,
source§fn from(value: &'static T) -> Self
fn from(value: &'static T) -> Self
Converts to this type from the input type.
source§impl<T> Ord for Soo<T>where
T: ToOwned + ?Sized + Ord + 'static,
T::Owned: Borrow<T>,
impl<T> Ord for Soo<T>where T: ToOwned + ?Sized + Ord + 'static, T::Owned: Borrow<T>,
source§impl<T, Rhs, V> PartialEq<Rhs> for Soo<T>where
T: ToOwned + ?Sized + PartialEq<V> + 'static,
T::Owned: Borrow<T>,
Rhs: Deref<Target = V> + ?Sized,
V: ?Sized,
impl<T, Rhs, V> PartialEq<Rhs> for Soo<T>where T: ToOwned + ?Sized + PartialEq<V> + 'static, T::Owned: Borrow<T>, Rhs: Deref<Target = V> + ?Sized, V: ?Sized,
source§impl<T, Rhs, V> PartialOrd<Rhs> for Soo<T>where
T: ToOwned + ?Sized + PartialOrd<V> + 'static,
T::Owned: Borrow<T>,
Rhs: Deref<Target = V> + ?Sized,
V: ?Sized,
impl<T, Rhs, V> PartialOrd<Rhs> for Soo<T>where T: ToOwned + ?Sized + PartialOrd<V> + 'static, T::Owned: Borrow<T>, Rhs: Deref<Target = V> + ?Sized, V: ?Sized,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<T> Eq for Soo<T>where T: ToOwned + ?Sized + Eq + 'static,
Auto Trait Implementations§
impl<T: ?Sized> RefUnwindSafe for Soo<T>where T: RefUnwindSafe, <T as ToOwned>::Owned: RefUnwindSafe,
impl<T: ?Sized> Send for Soo<T>where T: Sync, <T as ToOwned>::Owned: Send,
impl<T: ?Sized> Sync for Soo<T>where T: Sync, <T as ToOwned>::Owned: Sync,
impl<T: ?Sized> Unpin for Soo<T>where <T as ToOwned>::Owned: Unpin,
impl<T: ?Sized> UnwindSafe for Soo<T>where T: RefUnwindSafe, <T as ToOwned>::Owned: UnwindSafe,
Blanket Implementations§
source§impl<'x, T> ArcIterExt<'x> for Twhere
T: 'x,
impl<'x, T> ArcIterExt<'x> for Twhere T: 'x,
source§impl<T> AsRefIntoVec for Twhere
T: AsRef<[u8]>,
impl<T> AsRefIntoVec for Twhere T: AsRef<[u8]>,
source§impl<T> AsRefToString for Twhere
T: AsRef<str>,
impl<T> AsRefToString for Twhere T: AsRef<str>,
default fn as_ref_to_string(self) -> Soo<str>
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)