#[repr(transparent)]pub struct Pixel<const N: usize>([u8; N]);
Tuple Fields§
§0: [u8; N]
Implementations§
source§impl<const N: usize> Pixel<N>
impl<const N: usize> Pixel<N>
pub const fn new() -> Self
pub fn read(&mut self, s: &[u8])
pub fn update<const M: usize>(&mut self, px: Pixel<M>)
pub fn update_rgb(&mut self, r: u8, g: u8, b: u8)
pub fn update_rgba(&mut self, r: u8, g: u8, b: u8, a: u8)
pub fn update_diff(&mut self, b1: u8)
pub fn update_luma(&mut self, b1: u8, b2: u8)
pub const fn as_rgba(self, with_a: u8) -> Pixel<4>
pub const fn r(self) -> u8
pub const fn g(self) -> u8
pub const fn b(self) -> u8
pub const fn with_a(self, value: u8) -> Self
pub const fn a_or(self, value: u8) -> u8
pub fn hash_index(self) -> u8
pub fn rgb_add(&mut self, r: u8, g: u8, b: u8)
pub fn encode_into<W: Writer>(&self, px_prev: Self, buf: W) -> Result<W>
Trait Implementations§
source§impl<const N: usize> PartialEq for Pixel<N>
impl<const N: usize> PartialEq for Pixel<N>
impl<const N: usize> Copy for Pixel<N>
impl<const N: usize> Eq for Pixel<N>
impl<const N: usize> StructuralPartialEq for Pixel<N>
impl SupportedChannels for Pixel<3>
impl SupportedChannels for Pixel<4>
Auto Trait Implementations§
impl<const N: usize> Freeze for Pixel<N>
impl<const N: usize> RefUnwindSafe for Pixel<N>
impl<const N: usize> Send for Pixel<N>
impl<const N: usize> Sync for Pixel<N>
impl<const N: usize> Unpin for Pixel<N>
impl<const N: usize> UnwindSafe for Pixel<N>
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
Mutably borrows from an owned value. Read more