pub fn allow(buffer: &'b mut T) -> (Allowed<'b, T>, KernelPtr<'b, T>) {
        let ptr = NonNull::new(buffer).unwrap();
        // Discard buffer *without* creating a reference to it, as would be done
        // if we called drop().
        let _ = buffer;
        // All 3 preconditions of Allowed::new are satisfied by the fact that
        // `buffer` is directly derived from a &'b mut T.
        let allowed = unsafe { Allowed::new(ptr) };
        let kernel_ptr = KernelPtr {
            ptr,
            _phantom: PhantomData,
        };
        (allowed, kernel_ptr)
    }
// The constructor for KernelPtr; simulates allow(). Returns both the
// Allowed instance the Platform would return and a KernelPtr the test can
// use to simulate a kernel.
The constructor for KernelPtr; simulates allow(). Returns both the
Allowed instance the Platform would return and a KernelPtr the test can
use to simulate a kernel.
The constructor for KernelPtr ; simulates allow () . Returns both the Allowed instance the Platform would return and a KernelPtr the test can use to simulate a kernel .
pub fn allow(buffer: &'b mut T) -> (Allowed<'b, T>, KernelPtr<'b, T>) {
        let ptr = NonNull::new(buffer).unwrap();
        // Discard buffer *without* creating a reference to it, as would be done
        // if we called drop().
        let _ = buffer;
        // All 3 preconditions of Allowed::new are satisfied by the fact that
        // `buffer` is directly derived from a &'b mut T.
        let allowed = unsafe { Allowed::new(ptr) };
        let kernel_ptr = KernelPtr {
            ptr,
            _phantom: PhantomData,
        };
        (allowed, kernel_ptr)
    }
pub fn allow ( buffer : & ' b mut T ) -> ( Allowed < ' b , T > , KernelPtr < ' b , T > ) { let ptr = NonNull :: new ( buffer ) . unwrap ( ) ; // Discard buffer *without* creating a reference to it, as would be done // if we called drop(). let _ = buffer ; // All 3 preconditions of Allowed::new are satisfied by the fact that // `buffer` is directly derived from a &'b mut T. let allowed = unsafe { Allowed :: new ( ptr ) } ; let kernel_ptr = KernelPtr { ptr , _phantom : PhantomData , } ; ( allowed , kernel_ptr ) }
The constructor for KernelPtr; simulates allow().
The constructor for KernelPtr ; simulates allow () .
buffer
&'b mut T