pub enum Reference<'b, 'c, T: ?Sized + 'static> {
Borrowed(&'b T),
Copied(&'c T),
}
Expand description
Unification of both borrowed and non-borrowed reference types.
Variants§
Borrowed(&'b T)
The reference is pointed at data that was borrowed.
Copied(&'c T)
The reference is pointed at data that was copied.
Trait Implementations§
source§impl<'b, 'c, T: PartialEq + ?Sized + 'static> PartialEq for Reference<'b, 'c, T>
impl<'b, 'c, T: PartialEq + ?Sized + 'static> PartialEq for Reference<'b, 'c, T>
impl<'b, 'c, T: Copy + ?Sized + 'static> Copy for Reference<'b, 'c, T>
impl<'b, 'c, T: ?Sized + 'static> StructuralPartialEq for Reference<'b, 'c, T>
Auto Trait Implementations§
impl<'b, 'c, T> Freeze for Reference<'b, 'c, T>where
T: ?Sized,
impl<'b, 'c, T> RefUnwindSafe for Reference<'b, 'c, T>where
T: RefUnwindSafe + ?Sized,
impl<'b, 'c, T> Send for Reference<'b, 'c, T>
impl<'b, 'c, T> Sync for Reference<'b, 'c, T>
impl<'b, 'c, T> Unpin for Reference<'b, 'c, T>where
T: ?Sized,
impl<'b, 'c, T> UnwindSafe for Reference<'b, 'c, T>where
T: RefUnwindSafe + ?Sized,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)