Struct deref_owned::OwnedRef
source · [−]pub struct OwnedRef<T>(pub T);
Expand description
Smart pointer to value pointed-to by owned inner value
Tuple Fields
0: T
Trait Implementations
sourceimpl<B> BorrowMut<B> for OwnedRef<<B as ToOwned>::Owned> where
B: ?Sized + ToOwned,
<B as ToOwned>::Owned: BorrowMut<B>,
impl<B> BorrowMut<B> for OwnedRef<<B as ToOwned>::Owned> where
B: ?Sized + ToOwned,
<B as ToOwned>::Owned: BorrowMut<B>,
sourcefn borrow_mut(&mut self) -> &mut B
fn borrow_mut(&mut self) -> &mut B
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoOwned for OwnedRef<T> where
T: Deref + Borrow<<T as Deref>::Target>,
impl<T> IntoOwned for OwnedRef<T> where
T: Deref + Borrow<<T as Deref>::Target>,
type Owned = T
type Owned = T
The type the pointer can be converted into
sourcefn into_owned(self) -> Self::Owned
fn into_owned(self) -> Self::Owned
Convert into owned type
sourceimpl<T: Ord> Ord for OwnedRef<T>
impl<T: Ord> Ord for OwnedRef<T>
sourceimpl<T: PartialOrd> PartialOrd<OwnedRef<T>> for OwnedRef<T>
impl<T: PartialOrd> PartialOrd<OwnedRef<T>> for OwnedRef<T>
sourcefn partial_cmp(&self, other: &OwnedRef<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &OwnedRef<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl<T: Eq> Eq for OwnedRef<T>
impl<T> StructuralEq for OwnedRef<T>
impl<T> StructuralPartialEq for OwnedRef<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for OwnedRef<T> where
T: RefUnwindSafe,
impl<T> Send for OwnedRef<T> where
T: Send,
impl<T> Sync for OwnedRef<T> where
T: Sync,
impl<T> Unpin for OwnedRef<T> where
T: Unpin,
impl<T> UnwindSafe for OwnedRef<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more