[−][src]Struct stb::image::Data
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]
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Data<T> where
T: RefUnwindSafe,
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,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,