pub struct UserMemScope;
Expand description

Memory validation scope

Trait Implementations

Validates that the memory pointed to by ptr of the type T is:

  • in valid address space and writable for the lifetime of self.
  • “dereferenceable” in the sense defined in the ptr module documentation.
  • ptr is non-null and aligned
  • not borrowed already and registers the memory as borrowed mutably.

Returns a mutable borrow if valid, otherwise EINVAL.

Validates that the memory pointed to by ptr of the type T is:

  • in valid address space and readable for the lifetime of self.
  • “dereferenceable” in the sense defined in the ptr module documentation.
  • ptr is non-null and aligned
  • not borrowed already and registers the memory as borrowed.

Returns an immutable borrow if valid, otherwise EINVAL.

Validates that a region for len elements of type T is:

  • in valid address space and writable for the lifetime of self.
  • “dereferenceable” in the sense defined in the ptr module documentation.
  • ptr is non-null and aligned
  • not borrowed already and registers the memory as borrowed mutably.

Returns a mutable borrow if valid, otherwise EINVAL.

Validates that a region of memory is valid for read-only access for len elements of type T.

  • in valid address space and writable for the lifetime of self.
  • “dereferenceable” in the sense defined in the ptr module documentation.
  • ptr is non-null and aligned
  • not borrowed already and registers the memory as borrowed.

Returns an immutable borrow if valid, otherwise EINVAL.

Validates that pointer iov points to represents a slice of iovcnt pointers to [libc::iovec] structures valid for read-write access. Read more

Validates that pointer iov points to represents a slice of iovcnt pointers to [libc::iovec] structures valid for read-only access. Read more

Validates that a region of memory represents a C string and is valid for read-only access. Read more

Validates that pointer addrlen points to socklen_t and addr points to a byte array of size *addrlen and is valid for read-write access. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.