pub struct IcoFrame<'a> {
    encoded_image: Cow<'a, [u8]>,
    width: u8,
    height: u8,
    color_type: ExtendedColorType,
}Expand description
An ICO image entry
Fields§
§encoded_image: Cow<'a, [u8]>§width: u8§height: u8§color_type: ExtendedColorTypeImplementations§
Source§impl<'a> IcoFrame<'a>
 
impl<'a> IcoFrame<'a>
Sourcepub fn with_encoded(
    encoded_image: impl Into<Cow<'a, [u8]>>,
    width: u32,
    height: u32,
    color_type: ExtendedColorType,
) -> ImageResult<Self>
 
pub fn with_encoded( encoded_image: impl Into<Cow<'a, [u8]>>, width: u32, height: u32, color_type: ExtendedColorType, ) -> ImageResult<Self>
Construct a new IcoFrame using a pre-encoded PNG or BMP
The width and height must be between 1 and 256 (inclusive).
Sourcepub fn as_png(
    buf: &[u8],
    width: u32,
    height: u32,
    color_type: ExtendedColorType,
) -> ImageResult<Self>
 
pub fn as_png( buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType, ) -> ImageResult<Self>
Construct a new IcoFrame by encoding buf as a PNG
The width and height must be between 1 and 256 (inclusive)
Auto Trait Implementations§
impl<'a> Freeze for IcoFrame<'a>
impl<'a> RefUnwindSafe for IcoFrame<'a>
impl<'a> Send for IcoFrame<'a>
impl<'a> Sync for IcoFrame<'a>
impl<'a> Unpin for IcoFrame<'a>
impl<'a> UnwindSafe for IcoFrame<'a>
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