pub struct SolidColorGenerator { /* private fields */ }Expand description
A simple solid color generator.
Implementations§
Trait Implementations§
Source§impl ImageGenerator for SolidColorGenerator
impl ImageGenerator for SolidColorGenerator
Source§fn on_get_pixels(
&self,
pixels: &mut [u8],
row_bytes: usize,
) -> GeneratorResult<()>
fn on_get_pixels( &self, pixels: &mut [u8], row_bytes: usize, ) -> GeneratorResult<()>
Generate pixels into the provided buffer (implementation). Read more
Source§fn ref_encoded_data(&self) -> Option<Arc<[u8]>>
fn ref_encoded_data(&self) -> Option<Arc<[u8]>>
Get a reference to the original encoded data, if available. Read more
Source§fn query_supports_info(&self, info: &ImageInfo) -> bool
fn query_supports_info(&self, info: &ImageInfo) -> bool
Check if generating to the requested info is supported. Read more
Source§fn get_pixels(
&self,
info: &ImageInfo,
pixels: &mut [u8],
row_bytes: usize,
) -> GeneratorResult<()>
fn get_pixels( &self, info: &ImageInfo, pixels: &mut [u8], row_bytes: usize, ) -> GeneratorResult<()>
Generate pixels into the provided buffer. Read more
Source§fn on_get_pixels_with_conversion(
&self,
info: &ImageInfo,
pixels: &mut [u8],
row_bytes: usize,
) -> GeneratorResult<()>
fn on_get_pixels_with_conversion( &self, info: &ImageInfo, pixels: &mut [u8], row_bytes: usize, ) -> GeneratorResult<()>
Generate pixels with format conversion. Read more
Auto Trait Implementations§
impl Freeze for SolidColorGenerator
impl RefUnwindSafe for SolidColorGenerator
impl Send for SolidColorGenerator
impl Sync for SolidColorGenerator
impl Unpin for SolidColorGenerator
impl UnsafeUnpin for SolidColorGenerator
impl UnwindSafe for SolidColorGenerator
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
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> ⓘ
Converts
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> ⓘ
Converts
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