Trait linux_io::ptr::Repr

source ·
pub unsafe trait Repr<T> {
    // Required method
    fn from_ptr(ptr: *const T) -> Self;
}
Expand description

Trait implemented by types that can represent readable userspace addresses.

Required Methods§

source

fn from_ptr(ptr: *const T) -> Self

Convert the given pointer to the implementing type, without losing any information that the kernel would need to treat the result as a userspace pointer to the same address.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Repr<T> for *const T

source§

fn from_ptr(ptr: *const T) -> Self

source§

impl<T> Repr<T> for u64

source§

fn from_ptr(ptr: *const T) -> Self

source§

impl<T> Repr<T> for usize

source§

fn from_ptr(ptr: *const T) -> Self

Implementors§