[][src]Struct open_cl_low_level::cl_pointer::ClPointer

#[repr(C)]
pub struct ClPointer<T: Copy> { /* fields omitted */ }

ClPointer is a very short-lived struct that is used to homogenize the returns from many of the CL API calls. If a call to an OpenCL C function successfully returns a ClPointer that ClPointer MUST BE CONSUMED; Failure to consume the ClPointer will lead to a panic when the ClPointer struct is dropped.

Methods

impl ClPointer<u8>[src]

Only u8 ClPointers can become String

pub unsafe fn into_string(self) -> String[src]

impl<T: Copy> ClPointer<T>[src]

pub unsafe fn new(count: usize, ptr: *mut T) -> ClPointer<T>[src]

pub unsafe fn from_vec(v: Vec<T>) -> ClPointer<T>[src]

pub unsafe fn new_empty() -> ClPointer<T>[src]

pub fn is_empty(&self) -> bool[src]

pub fn is_null(&self) -> bool[src]

pub unsafe fn into_one(self) -> T[src]

pub unsafe fn into_vec(self) -> Vec<T>[src]

Trait Implementations

impl<T: Copy> Debug for ClPointer<T>[src]

impl<T: Copy> Drop for ClPointer<T>[src]

impl From<ClPointer<u32>> for bool[src]

impl From<ClPointer<u8>> for String[src]

Auto Trait Implementations

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

impl<T> !Send for ClPointer<T>

impl<T> !Sync for ClPointer<T>

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

impl<T> UnwindSafe for ClPointer<T> where
    T: RefUnwindSafe + 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, 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.