pub struct HashedPtr<T: ?Sized>(pub *const T);Expand description
A wrapper for pointers that formats them using kernel’s %p format specifier.
By default, %p prints a hashed representation of the pointer address to prevent kernel address
leaks. When the no_hash_pointers kernel command-line parameter is enabled, the real address is
printed instead (for debugging purposes).
Tuple Fields§
§0: *const TTrait Implementations§
Auto Trait Implementations§
impl<T> !Send for HashedPtr<T>
impl<T> !Sync for HashedPtr<T>
impl<T> Freeze for HashedPtr<T>where
T: ?Sized,
impl<T> RefUnwindSafe for HashedPtr<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for HashedPtr<T>where
T: ?Sized,
impl<T> UnsafeUnpin for HashedPtr<T>where
T: ?Sized,
impl<T> UnwindSafe for HashedPtr<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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
Source§fn into_safe_cast(self) -> T
fn into_safe_cast(self) -> T
Convert
self into a T. This operation is guaranteed to be lossless.Source§impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
Source§fn into_safe_cast_arch(self) -> T
fn into_safe_cast_arch(self) -> T
Convert
self into a T. This operation is guaranteed to be lossless.