pub struct AbstractRef<'a, M, T, A = ReadWrite>where
T: ?Sized,{ /* private fields */ }
Implementations§
Source§impl<'a, M, T> AbstractRef<'a, M, T>where
T: ?Sized,
impl<'a, M, T> AbstractRef<'a, M, T>where
T: ?Sized,
pub unsafe fn new(pointer: NonNull<T>) -> Self
pub const unsafe fn new_read_only( pointer: NonNull<T>, ) -> AbstractRef<'a, M, T, ReadOnly>
pub const unsafe fn new_restricted<A>(
access: A,
pointer: NonNull<T>,
) -> AbstractRef<'a, M, T, A>where
A: Access,
pub fn from_ref(reference: &'a T) -> AbstractRef<'a, M, T, ReadOnly>where
T: 'a,
pub fn from_mut_ref(reference: &'a mut T) -> Selfwhere
T: 'a,
Source§impl<'a, M, T, A> AbstractRef<'a, M, T, A>where
T: ?Sized,
impl<'a, M, T, A> AbstractRef<'a, M, T, A>where
T: ?Sized,
pub fn borrow(&self) -> AbstractRef<'_, M, T, A::Restricted>where
A: RestrictAccess<ReadOnly>,
pub fn borrow_mut(&mut self) -> AbstractRef<'_, M, T, A>where
A: Access,
pub fn as_ptr(&self) -> AbstractPtr<'_, M, T, A::Restricted>where
A: RestrictAccess<ReadOnly>,
pub fn as_mut_ptr(&mut self) -> AbstractPtr<'_, M, T, A>where
A: Access,
pub fn into_ptr(self) -> AbstractPtr<'a, M, T, A>where
A: Access,
Source§impl<'a, M, T, A> AbstractRef<'a, M, T, A>where
T: ?Sized,
impl<'a, M, T, A> AbstractRef<'a, M, T, A>where
T: ?Sized,
pub fn restrict<To>(self) -> AbstractRef<'a, M, T, A::Restricted>where
A: RestrictAccess<To>,
Source§impl<'a, M, T> AbstractRef<'a, M, T, ReadWrite>where
T: ?Sized,
impl<'a, M, T> AbstractRef<'a, M, T, ReadWrite>where
T: ?Sized,
pub fn read_only(self) -> AbstractRef<'a, M, T, ReadOnly>
pub fn write_only(self) -> AbstractRef<'a, M, T, WriteOnly>
Trait Implementations§
Source§impl<M, T, A> Clone for AbstractRef<'_, M, T, A>
impl<M, T, A> Clone for AbstractRef<'_, M, T, A>
Source§impl<M, T, A> Debug for AbstractRef<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Debug for AbstractRef<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> Hash for AbstractRef<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Hash for AbstractRef<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> Ord for AbstractRef<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Ord for AbstractRef<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> PartialEq for AbstractRef<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> PartialEq for AbstractRef<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> PartialOrd for AbstractRef<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> PartialOrd for AbstractRef<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> Pointer for AbstractRef<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Pointer for AbstractRef<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Copy for AbstractRef<'_, M, T, A>
impl<M, T, A> Eq for AbstractRef<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Send for AbstractRef<'_, M, T, A>where
T: Sync + ?Sized,
impl<M, T, A> Sync for AbstractRef<'_, M, T, A>where
T: Sync + ?Sized,
Auto Trait Implementations§
impl<'a, M, T, A> Freeze for AbstractRef<'a, M, T, A>where
T: ?Sized,
impl<'a, M, T, A> RefUnwindSafe for AbstractRef<'a, M, T, A>where
M: RefUnwindSafe,
A: RefUnwindSafe,
T: RefUnwindSafe + ?Sized,
impl<'a, M, T, A> Unpin for AbstractRef<'a, M, T, A>where
M: Unpin,
A: Unpin,
T: ?Sized,
impl<'a, M, T, A> UnwindSafe for AbstractRef<'a, M, T, A>where
T: RefUnwindSafe + ?Sized,
M: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)