Enum cl3::info_type::InfoType[][src]

pub enum InfoType {
    Int(cl_int),
    Uint(cl_uint),
    Ulong(cl_ulong),
    Size(size_t),
    Ptr(intptr_t),
    VecUchar(Vec<cl_uchar>),
    VecUlong(Vec<cl_ulong>),
    VecSize(Vec<size_t>),
    VecIntPtr(Vec<intptr_t>),
    VecNameVersion(Vec<cl_name_version>),
    VecImageFormat(Vec<cl_image_format>),
    VecVecUchar(Vec<Vec<cl_uchar>>),
}
Expand description

A Rust enum to handle OpenCL API “Info” function return types.
It provides functions to extract each data type from the enum.
The functions will panic if they are called for the incorrect type.

Variants

Int(cl_int)
Uint(cl_uint)
Ulong(cl_ulong)
Size(size_t)
VecUchar(Vec<cl_uchar>)
VecUlong(Vec<cl_ulong>)
VecSize(Vec<size_t>)
VecIntPtr(Vec<intptr_t>)
VecNameVersion(Vec<cl_name_version>)
VecImageFormat(Vec<cl_image_format>)
VecVecUchar(Vec<Vec<cl_uchar>>)

Implementations

impl InfoType[src]

pub fn to_string(self) -> String[src]

Get a Vec<cl_uchar> aka Vec<u8> as a String. Note: it uses from_utf8_lossy to convert any invalid characters to std::char::REPLACEMENT_CHARACTER.

returns a utf8 String.

pub fn to_int(self) -> cl_int[src]

pub fn to_uint(self) -> cl_uint[src]

pub fn to_ulong(self) -> cl_ulong[src]

pub fn to_size(self) -> size_t[src]

pub fn to_ptr(self) -> intptr_t[src]

pub fn to_vec_uchar(self) -> Vec<cl_uchar>[src]

pub fn to_vec_ulong(self) -> Vec<cl_ulong>[src]

pub fn to_vec_size(self) -> Vec<size_t>[src]

pub fn to_vec_intptr(self) -> Vec<intptr_t>[src]

pub fn to_vec_name_version(self) -> Vec<cl_name_version>[src]

pub fn to_vec_image_format(self) -> Vec<cl_image_format>[src]

pub fn to_vec_vec_uchar(self) -> Vec<Vec<cl_uchar>>[src]

Trait Implementations

impl Debug for InfoType[src]

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

Formats the value using the given formatter. Read more

impl Display for InfoType[src]

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

Formats the value using the given formatter. Read more

impl From<InfoType> for cl_int[src]

fn from(info_type: InfoType) -> Self[src]

Performs the conversion.

impl From<InfoType> for cl_uint[src]

fn from(info_type: InfoType) -> Self[src]

Performs the conversion.

impl From<InfoType> for cl_ulong[src]

fn from(info_type: InfoType) -> Self[src]

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

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

Immutably borrows from an owned value. Read more

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

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

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

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

Performs the conversion.

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.

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

Performs the conversion.