pub struct ColorEncodingWithProfile { /* private fields */ }
Expand description
Color encoding represented by either enum values or an ICC profile.
Implementations§
Source§impl ColorEncodingWithProfile
impl ColorEncodingWithProfile
Sourcepub fn new(encoding: EnumColourEncoding) -> ColorEncodingWithProfile
pub fn new(encoding: EnumColourEncoding) -> ColorEncodingWithProfile
Creates a color encoding from enum values.
Sourcepub fn with_icc(icc_profile: &[u8]) -> Result<ColorEncodingWithProfile, Error>
pub fn with_icc(icc_profile: &[u8]) -> Result<ColorEncodingWithProfile, Error>
Creates a color encoding from ICC profile.
§Errors
This function will return an error if it cannot parse the ICC profile.
Sourcepub fn encoding(&self) -> &ColourEncoding
pub fn encoding(&self) -> &ColourEncoding
Returns the color encoding representation.
Sourcepub fn icc_profile(&self) -> &[u8] ⓘ
pub fn icc_profile(&self) -> &[u8] ⓘ
Returns the associated ICC profile.
Sourcepub fn is_grayscale(&self) -> bool
pub fn is_grayscale(&self) -> bool
Returns whether the color encoding describes a grayscale color space.
Trait Implementations§
Source§impl Clone for ColorEncodingWithProfile
impl Clone for ColorEncodingWithProfile
Source§fn clone(&self) -> ColorEncodingWithProfile
fn clone(&self) -> ColorEncodingWithProfile
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ColorEncodingWithProfile
impl RefUnwindSafe for ColorEncodingWithProfile
impl Send for ColorEncodingWithProfile
impl Sync for ColorEncodingWithProfile
impl Unpin for ColorEncodingWithProfile
impl UnwindSafe for ColorEncodingWithProfile
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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