[][src]Struct stb::image::Data

pub struct Data<T> { /* fields omitted */ }

Holds image memory allocated by stb and responsible for calling stbi_image_free once dropped.

Implementations

impl<T> Data<T>[src]

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

Returns image memory as a slice

pub fn size(&self) -> usize[src]

Returns the number of elements (which is width x height x desired_channels)

impl<T: Clone> Data<T>[src]

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

Consumes this object into Rust owned vector

Trait Implementations

impl<T> Drop for Data<T>[src]

Auto Trait Implementations

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

impl<T> !Send for Data<T>

impl<T> !Sync for Data<T>

impl<T> Unpin for Data<T>

impl<T> UnwindSafe for Data<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.