Skip to main content

Pointer

Trait Pointer 

Source
pub trait Pointer {
    // Required method
    fn fmt(&self, f: &mut Formatter<'_>) -> Result;
}
Expand description

A copy of core::fmt::Pointer that allows implementing pointer formatting for foreign types.

Together with the [Adapter] type and fmt! macro, it enables raw pointer formatting to be intercepted and routed to HashedPtr (kernel’s %p hashed format), preventing kernel address leaks.

Required Methods§

Source

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: ?Sized> Pointer for &T

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T: ?Sized> Pointer for &mut T

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T: ?Sized> Pointer for *const T

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T: ?Sized> Pointer for *mut T

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T: ?Sized> Pointer for NonNull<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Implementors§