#[repr(packed(1))]pub struct Coord {
pub x: PixelAddress,
pub y: PixelAddress,
pub c: Option<u8>,
}
Expand description
Pixel channel address in the ADΔER model
Fields§
§x: PixelAddress
Pixel x-coordinate
y: PixelAddress
Pixel y-coordinate
c: Option<u8>
Pixel channel, if present
Implementations§
Source§impl Coord
impl Coord
Sourcepub fn new(x: PixelAddress, y: PixelAddress, c: Option<u8>) -> Self
pub fn new(x: PixelAddress, y: PixelAddress, c: Option<u8>) -> Self
Creates a new coordinate with the given x, y, and channel
Sourcepub fn new_2d(x: PixelAddress, y: PixelAddress) -> Self
pub fn new_2d(x: PixelAddress, y: PixelAddress) -> Self
Creates a new 2D coordinate
Sourcepub fn new_3d(x: PixelAddress, y: PixelAddress, c: u8) -> Self
pub fn new_3d(x: PixelAddress, y: PixelAddress, c: u8) -> Self
Creates a new 3D coordinate with the given channel
Sourcepub fn x(&self) -> PixelAddress
pub fn x(&self) -> PixelAddress
Returns the x coordinate as a PixelAddress
Sourcepub fn y(&self) -> PixelAddress
pub fn y(&self) -> PixelAddress
Returns the y coordinate as a PixelAddress
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Coord
impl<'de> Deserialize<'de> for Coord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Coord
impl Eq for Coord
impl StructuralPartialEq for Coord
Auto Trait Implementations§
impl Freeze for Coord
impl RefUnwindSafe for Coord
impl Send for Coord
impl Sync for Coord
impl Unpin for Coord
impl UnwindSafe for Coord
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.