[][src]Struct bve_native::CVector

#[repr(C)]
pub struct CVector<T> {
    pub ptr: *mut T,
    pub count: size_t,
    pub capacity: size_t,
}

C safe wrapper for a Vec.

Safety

  • Modifying the contents in the array is valid.
  • Increasing count such that count <= capacity is valid.
  • Do not manually delete/realloc the pointer. Must use the deleter for the container where this vector was found.

Fields

ptr: *mut T

Ptr to the array of elements

count: size_t

Count of elements, do not run beyond this amount

capacity: size_t

Capacity of the underlying buffer

Trait Implementations

impl<T, U> From<Vec<U>> for CVector<T> where
    U: Into<T>, 
[src]

impl<T, U> Into<Vec<U>> for CVector<T> where
    T: Into<U>, 
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for CVector<T> where
    T: RefUnwindSafe

impl<T> !Send for CVector<T>

impl<T> !Sync for CVector<T>

impl<T> Unpin for CVector<T>

impl<T> UnwindSafe for CVector<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.