unity::cppvector

Struct CppVector

source
#[repr(C)]
pub struct CppVector<T> { /* private fields */ }

Implementations§

source§

impl<T> CppVector<T>

source

pub fn new() -> Self

source

pub fn with_capacity(cap: usize) -> Self

source

pub fn push(&mut self, val: T)

source

pub fn reserve(&mut self, additional: usize)

source

pub fn iter(&self) -> CppVectorIterator<'_, T>

source

pub fn iter_mut(&mut self) -> CppVectorIteratorMut<'_, T>

source

pub fn len(&self) -> usize

source

pub fn as_ptr(&self) -> *const T

source

pub fn as_mut_ptr(&mut self) -> *mut T

source

pub fn as_slice(&self) -> &[T]

source

pub fn as_mut_slice(&mut self) -> &mut [T]

source

pub fn extend_from_slice(&mut self, slice: &[T])
where T: Copy + Clone,

source§

impl<T: Copy + Clone> CppVector<T>

source

pub fn from_slice(slice: &[T]) -> Self

source§

impl<T: Clone> CppVector<T>

source

pub fn clone_from_slice(slice: &[T]) -> Self

Trait Implementations§

source§

impl<T: Debug> Debug for CppVector<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for CppVector<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T> Index<Range<usize>> for CppVector<T>

source§

type Output = [T]

The returned type after indexing.
source§

fn index(&self, index: Range<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T> Index<usize> for CppVector<T>

source§

type Output = T

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T> IndexMut<Range<usize>> for CppVector<T>

source§

fn index_mut(&mut self, index: Range<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<T> IndexMut<usize> for CppVector<T>

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T> IntoIterator for &'a CppVector<T>

source§

type IntoIter = CppVectorIterator<'a, T>

Which kind of iterator are we turning this into?
source§

type Item = &'a T

The type of the elements being iterated over.
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T> IntoIterator for &'a mut CppVector<T>

source§

type IntoIter = CppVectorIteratorMut<'a, T>

Which kind of iterator are we turning this into?
source§

type Item = &'a mut T

The type of the elements being iterated over.
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<T> Freeze for CppVector<T>

§

impl<T> RefUnwindSafe for CppVector<T>
where T: RefUnwindSafe,

§

impl<T> !Send for CppVector<T>

§

impl<T> !Sync for CppVector<T>

§

impl<T> Unpin for CppVector<T>

§

impl<T> UnwindSafe for CppVector<T>
where T: RefUnwindSafe,

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.