Struct adder_codec_rs::Coord
source · #[repr(packed)]pub struct Coord {
pub x: PixelAddress,
pub y: PixelAddress,
pub c: Option<u8>,
}
Fields§
§x: PixelAddress
§y: PixelAddress
§c: Option<u8>
Implementations§
source§impl Coord
impl Coord
pub fn new(x: PixelAddress, y: PixelAddress, c: Option<u8>) -> Self
pub fn new_2d(x: PixelAddress, y: PixelAddress) -> Self
pub fn new_3d(x: PixelAddress, y: PixelAddress, c: u8) -> Self
pub fn x(&self) -> PixelAddress
pub fn y(&self) -> PixelAddress
pub fn c(&self) -> Option<u8>
pub fn x_usize(&self) -> usize
pub fn y_usize(&self) -> usize
pub fn c_usize(&self) -> usize
pub fn is_2d(&self) -> bool
pub fn is_3d(&self) -> bool
pub fn is_valid(&self) -> bool
pub fn is_eof(&self) -> bool
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
source§impl PartialEq<Coord> for Coord
impl PartialEq<Coord> for Coord
impl Copy for Coord
impl Eq for Coord
impl StructuralEq for Coord
impl StructuralPartialEq for Coord
Auto Trait Implementations§
impl RefUnwindSafe for Coord
impl Send for Coord
impl Sync for Coord
impl Unpin for Coord
impl UnwindSafe for Coord
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.