Struct static_cow::Owned
source · Expand description
A StaticCow implementation which wraps an owned type.
Tuple Fields§
§0: B::OwningTrait Implementations§
source§impl<'o, B> Default for Owned<'o, B>where
B: ToOwning<'o> + ?Sized + Default,
B::Owning: Default,
impl<'o, B> Default for Owned<'o, B>where
B: ToOwning<'o> + ?Sized + Default,
B::Owning: Default,
source§impl<'o, B> DerefMut for Owned<'o, B>where
B: ToOwning<'o> + ?Sized,
B::Owning: BorrowMut<B>,
impl<'o, B> DerefMut for Owned<'o, B>where
B: ToOwning<'o> + ?Sized,
B::Owning: BorrowMut<B>,
source§impl<'o, B> IntoOwning<'o> for Owned<'o, B>where
B: 'o + ToOwning<'o> + ?Sized,
B::Owning: Borrow<B>,
impl<'o, B> IntoOwning<'o> for Owned<'o, B>where
B: 'o + ToOwning<'o> + ?Sized,
B::Owning: Borrow<B>,
source§fn into_owning(self) -> Self::Owning
fn into_owning(self) -> Self::Owning
Converts an object which owns its contents into one which borrows them.
source§impl<'o, B> Ord for Owned<'o, B>where
B: ToOwning<'o> + ?Sized + Ord,
B::Owning: Ord,
impl<'o, B> Ord for Owned<'o, B>where
B: ToOwning<'o> + ?Sized + Ord,
B::Owning: Ord,
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<'o, B> PartialEq<Owned<'o, B>> for Owned<'o, B>where
B: ToOwning<'o> + ?Sized + PartialEq,
B::Owning: PartialEq,
impl<'o, B> PartialEq<Owned<'o, B>> for Owned<'o, B>where
B: ToOwning<'o> + ?Sized + PartialEq,
B::Owning: PartialEq,
source§impl<'o, B> PartialOrd<Owned<'o, B>> for Owned<'o, B>where
B: ToOwning<'o> + ?Sized + PartialOrd,
B::Owning: PartialOrd,
impl<'o, B> PartialOrd<Owned<'o, B>> for Owned<'o, B>where
B: ToOwning<'o> + ?Sized + PartialOrd,
B::Owning: PartialOrd,
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 moresource§impl<'o, B> StaticCow<'o, 'o, B> for Owned<'o, B>where
B: 'o + ToOwned + ?Sized,
impl<'o, B> StaticCow<'o, 'o, B> for Owned<'o, B>where
B: 'o + ToOwned + ?Sized,
source§fn is_owned(&self) -> bool
fn is_owned(&self) -> bool
Returns true iff the data is owned, i.e. if
self.into_owning() would
be a no-op.source§fn mut_if_owned(&mut self) -> MutIfOwned<'_, B>
fn mut_if_owned(&mut self) -> MutIfOwned<'_, B>
Returns either an immutable reference to an object that is borrowed, or
a mutable reference to one which is owned. Read more
source§fn into_owned(self) -> <B as ToOwned>::Owned
fn into_owned(self) -> <B as ToOwned>::Owned
Converts
self into a B::Owned, cloning only if necessary.source§fn is_borrowed(&self) -> bool
fn is_borrowed(&self) -> bool
Returns true iff the data is borrowed, i.e. if
self.into_owning()
would clone it.