Enum psd::PsdChannelKind
source · pub enum PsdChannelKind {
Red = 0,
Green = 1,
Blue = 2,
TransparencyMask = -1,
UserSuppliedLayerMask = -2,
RealUserSuppliedLayerMask = -3,
}
Expand description
The different kinds of channels in a layer (red, green, blue, …).
Variants§
Red = 0
Green = 1
Blue = 2
TransparencyMask = -1
UserSuppliedLayerMask = -2
RealUserSuppliedLayerMask = -3
Implementations§
source§impl PsdChannelKind
impl PsdChannelKind
sourcepub fn new(channel_id: i16) -> Option<PsdChannelKind>
pub fn new(channel_id: i16) -> Option<PsdChannelKind>
Create a new PsdLayerChannel
sourcepub fn rgba_offset(self) -> Result<usize, String>
pub fn rgba_offset(self) -> Result<usize, String>
R -> 0 G -> 1 B -> 2 A -> 3
Trait Implementations§
source§impl Clone for PsdChannelKind
impl Clone for PsdChannelKind
source§fn clone(&self) -> PsdChannelKind
fn clone(&self) -> PsdChannelKind
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 moresource§impl Debug for PsdChannelKind
impl Debug for PsdChannelKind
source§impl Hash for PsdChannelKind
impl Hash for PsdChannelKind
source§impl Ord for PsdChannelKind
impl Ord for PsdChannelKind
source§fn cmp(&self, other: &PsdChannelKind) -> Ordering
fn cmp(&self, other: &PsdChannelKind) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for PsdChannelKind
impl PartialEq for PsdChannelKind
source§fn eq(&self, other: &PsdChannelKind) -> bool
fn eq(&self, other: &PsdChannelKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PsdChannelKind
impl PartialOrd for PsdChannelKind
source§fn partial_cmp(&self, other: &PsdChannelKind) -> Option<Ordering>
fn partial_cmp(&self, other: &PsdChannelKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for PsdChannelKind
impl Eq for PsdChannelKind
impl StructuralEq for PsdChannelKind
impl StructuralPartialEq for PsdChannelKind
Auto Trait Implementations§
impl RefUnwindSafe for PsdChannelKind
impl Send for PsdChannelKind
impl Sync for PsdChannelKind
impl Unpin for PsdChannelKind
impl UnwindSafe for PsdChannelKind
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