[][src]Trait heaparray::UnsafeArrayRef

pub trait UnsafeArrayRef<'a, B>: BaseArrayRef where
    B: ?Sized
{ unsafe fn from_raw_parts(ptr: &'a mut B) -> Self;
unsafe fn to_null<'b>(&mut self) -> &'b mut B;
unsafe fn null_ref() -> Self; }

A reference to a heap-allocated array whose safe API guarrantees it to always be non-null.

Required methods

unsafe fn from_raw_parts(ptr: &'a mut B) -> Self

Creates a new array from a raw pointer to a memory block.

unsafe fn to_null<'b>(&mut self) -> &'b mut B

Sets the internal pointer to null, without deallocating it, and returns a reference to the associated memory block. Causes all sorts of undefined behavior, use with caution.

unsafe fn null_ref() -> Self

Creates a null array. All kinds of UB associated with this, use with caution.

Loading content...

Implementors

impl<'a, E, L> UnsafeArrayRef<'a, FPArrayBlock<E, L>> for FatPtrArray<'a, E, L>[src]

impl<'a, E, L> UnsafeArrayRef<'a, FPArrayBlock<E, L>> for HeapArray<'a, E, L>[src]

impl<'a, E, L> UnsafeArrayRef<'a, TPArrayBlock<E, L>> for ThinPtrArray<'a, E, L>[src]

Loading content...