pub struct CustomGrant<T> { /* private fields */ }
Expand description

Grant which was allocated from the kernel-owned grant region in a specific process’s memory, separately from a normal Grant.

A CustomGrant allows a capsule to allocate additional memory on behalf of a process.

Implementations

Helper function to get the ProcessId from the custom grant.

Gives access to inner data within the given closure.

If the process has since been restarted or crashed, or the memory is otherwise no longer present, then this function will not call the given closure, and will instead directly return Err(Error::NoSuchApp).

Because this function requires &mut self, it should be impossible to access the inner data of a given CustomGrant reentrantly. Thus the reentrance detection we use for non-custom grants is not needed here.

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.

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.