[][src]Struct tension::HostBuffer

pub struct HostBuffer<T: Prm> { /* fields omitted */ }

Buffer that stores data on the host. Simply a wrapper around Vec.

Implementations

impl<T: Prm> HostBuffer<T>[src]

pub unsafe fn new_uninit(len: usize) -> Self[src]

Create uninitialzed buffer. This is unsafe method, but it is helpful for allocation of storage for some subsequent operation.

pub fn new_filled(len: usize, value: T) -> Self[src]

Create buffer filled with a single value.

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

Provideas access to underlying memory.

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

Provideas mutable access to underlying memory.

Trait Implementations

impl<T: Prm> Buffer<T> for HostBuffer<T>[src]

type Context = ()

Context for buffer allocation.

impl<T: Clone + Prm> Clone for HostBuffer<T>[src]

Auto Trait Implementations

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

impl<T> Send for HostBuffer<T> where
    T: Send

impl<T> Sync for HostBuffer<T> where
    T: Sync

impl<T> Unpin for HostBuffer<T> where
    T: Unpin

impl<T> UnwindSafe for HostBuffer<T> where
    T: UnwindSafe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.