[go: up one dir, main page]

Array

Trait Array 

Source
pub unsafe trait Array {
    type Item;

    // Required methods
    fn size() -> usize;
    fn ptr(&self) -> *const Self::Item;
    fn ptr_mut(&mut self) -> *mut Self::Item;
}
Expand description

Types that can be used as the backing store for a StackVec

Required Associated Types§

Source

type Item

The type of the array’s elements.

Required Methods§

Source

fn size() -> usize

Returns the number of items the array can hold.

Source

fn ptr(&self) -> *const Self::Item

Returns a pointer to the first element of the array.

Source

fn ptr_mut(&mut self) -> *mut Self::Item

Returns a mutable pointer to the first element of the array.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> Array for [T; 0]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 1]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 2]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 3]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 4]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 5]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 6]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 7]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 8]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 9]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 10]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 11]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 12]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 13]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 14]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 15]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 16]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 20]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 24]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 32]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 36]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 64]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 128]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 256]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 512]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 1024]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 2048]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 4096]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 8192]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 16384]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 32768]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 65536]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 131072]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 262144]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 524288]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Source§

impl<T> Array for [T; 1048576]

Source§

type Item = T

Source§

fn size() -> usize

Source§

fn ptr(&self) -> *const T

Source§

fn ptr_mut(&mut self) -> *mut T

Implementors§