#[repr(transparent)]pub struct FatArrayPtr<Id: CollectorId> { /* private fields */ }
Expand description
Represents an array as a fat pointer.
Safety
This pointer is stored as a NonNull<[c_void]>
Transmuting back and forth is safe if and only if
it is cast to a T
first.
Implementations
sourceimpl<Id: CollectorId> FatArrayPtr<Id>
impl<Id: CollectorId> FatArrayPtr<Id>
Trait Implementations
sourceimpl<Id: CollectorId> Clone for FatArrayPtr<Id>
impl<Id: CollectorId> Clone for FatArrayPtr<Id>
sourceimpl<Id: CollectorId> GcArrayPtr for FatArrayPtr<Id>
impl<Id: CollectorId> GcArrayPtr for FatArrayPtr<Id>
type Id = Id
type Id = Id
The repr’s collector
sourceconst UNCHECKED_KIND: ArrayPtrKind
const UNCHECKED_KIND: ArrayPtrKind
The “kind” of the array pointer (whether fat or thin) Read more
sourceunsafe fn from_raw_parts<T>(ptr: NonNull<T>, len: usize) -> Self
unsafe fn from_raw_parts<T>(ptr: NonNull<T>, len: usize) -> Self
Construct an array representation from a combination of a pointer and length. Read more
sourcefn as_raw_ptr(&self) -> *mut c_void
fn as_raw_ptr(&self) -> *mut c_void
Get a raw pointer to this array’s elements. Read more
impl<Id: CollectorId> Copy for FatArrayPtr<Id>
Auto Trait Implementations
impl<Id> RefUnwindSafe for FatArrayPtr<Id> where
Id: RefUnwindSafe,
impl<Id> !Send for FatArrayPtr<Id>
impl<Id> !Sync for FatArrayPtr<Id>
impl<Id> Unpin for FatArrayPtr<Id> where
Id: Unpin,
impl<Id> UnwindSafe for FatArrayPtr<Id> where
Id: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more