Struct static_cow::Borrowed
source · Expand description
A StaticCow implementation which wraps an immutable reference.
Tuple Fields§
§0: &'b BTrait Implementations§
source§impl<'b, 'o, B> IntoOwning<'o> for Borrowed<'b, B>where
B: 'o + ToOwning<'o> + ?Sized,
impl<'b, 'o, B> IntoOwning<'o> for Borrowed<'b, B>where
B: 'o + ToOwning<'o> + ?Sized,
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<'b, B: Ord + ?Sized> Ord for Borrowed<'b, B>
impl<'b, B: Ord + ?Sized> Ord for Borrowed<'b, B>
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<'b, B: PartialEq + ?Sized> PartialEq<Borrowed<'b, B>> for Borrowed<'b, B>
impl<'b, B: PartialEq + ?Sized> PartialEq<Borrowed<'b, B>> for Borrowed<'b, B>
source§impl<'b, B: PartialOrd + ?Sized> PartialOrd<Borrowed<'b, B>> for Borrowed<'b, B>
impl<'b, B: PartialOrd + ?Sized> PartialOrd<Borrowed<'b, B>> for Borrowed<'b, B>
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<'b, 'o, B> StaticCow<'b, 'o, B> for Borrowed<'b, B>where
B: 'o + ToOwned + ?Sized,
impl<'b, 'o, B> StaticCow<'b, 'o, B> for Borrowed<'b, 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<'_, <Self as Deref>::Target>
fn mut_if_owned(&mut self) -> MutIfOwned<'_, <Self as Deref>::Target>
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::Owned
fn into_owned(self) -> B::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.