pub struct RgbaImage {
pub width: u32,
pub height: u32,
pub rgba: Vec<u8>,
}Expand description
A decoded placeholder: packed RGBA8, width * height * 4 bytes.
Deliberately a bare owned triple rather than media::image::buffer::ImageBuffer. That type
is inside the retiring media stack and carries PixelFormat / ComponentType /
ColorSpace discriminants this module has no use for — a placeholder is always packed
RGBA8 in sRGB. Depending on it would re-gate this module behind media (and therefore
native), which is precisely the coupling the slice exists to break; introducing a second
general-purpose buffer type outside media would instead pre-empt whatever the Rawshift
rebuild lands. The narrowest thing that carries the whole result is the right seam, and the
media-side adapter converts it back to an ImageBuffer for as long as that stack lives.
Fields§
§width: u32Width in pixels; always at least 1.
height: u32Height in pixels; always at least 1.
rgba: Vec<u8>Packed RGBA8 samples, width * height * 4 bytes long.
Trait Implementations§
impl Eq for RgbaImage
impl StructuralPartialEq for RgbaImage
Auto Trait Implementations§
impl Freeze for RgbaImage
impl RefUnwindSafe for RgbaImage
impl Send for RgbaImage
impl Sync for RgbaImage
impl Unpin for RgbaImage
impl UnsafeUnpin for RgbaImage
impl UnwindSafe for RgbaImage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more