pub struct Pointer<Type> { /* private fields */ }Implementations§
Source§impl<Type> Pointer<Type>
impl<Type> Pointer<Type>
pub const fn is_null(self) -> bool
pub fn address(self) -> usize
pub const fn add(self, count: usize) -> Pointer<Type>
pub const fn sub(self, count: usize) -> Pointer<Type>
pub const unsafe fn read(self) -> Option<Type>
pub const fn as_ptr(self) -> *const Type
pub const fn as_ptr_mut(self) -> *mut Type
pub const fn get<'lifetime>(self) -> Option<&'lifetime Type>
pub const fn get_mut<'lifetime>(self) -> Option<&'lifetime mut Type>
pub const fn take(self) -> Option<NonNull<Type>>
pub fn is_aligned(self) -> bool
pub const fn cast<Other>(self) -> Pointer<Other>
pub fn mask(self, mask: usize) -> Pointer<Type>
Trait Implementations§
impl<Type> Copy for Pointer<Type>
impl<Type> Eq for Pointer<Type>
Source§impl<Type> Ord for Pointer<Type>
impl<Type> Ord for Pointer<Type>
1.21.0 (const: unstable) · 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<Type> PartialOrd for Pointer<Type>
impl<Type> PartialOrd for Pointer<Type>
impl<Type> Send for Pointer<Type>
impl<Type> Sync for Pointer<Type>
Auto Trait Implementations§
impl<Type> Freeze for Pointer<Type>
impl<Type> RefUnwindSafe for Pointer<Type>where
Type: RefUnwindSafe,
impl<Type> Unpin for Pointer<Type>
impl<Type> UnsafeUnpin for Pointer<Type>
impl<Type> UnwindSafe for Pointer<Type>where
Type: RefUnwindSafe,
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