Struct nft_pixelboard_io::Coordinates
source · pub struct Coordinates {
pub x: BlockSideLength,
pub y: BlockSideLength,
}
Expand description
Coordinates of some pixel on a canvas.
Fields§
§x: BlockSideLength
§y: BlockSideLength
Trait Implementations§
source§impl Clone for Coordinates
impl Clone for Coordinates
source§fn clone(&self) -> Coordinates
fn clone(&self) -> Coordinates
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 Coordinates
impl Debug for Coordinates
source§impl Decode for Coordinates
impl Decode for Coordinates
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
source§impl Default for Coordinates
impl Default for Coordinates
source§fn default() -> Coordinates
fn default() -> Coordinates
Returns the “default value” for a type. Read more
source§impl Encode for Coordinates
impl Encode for Coordinates
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<(u16, u16)> for Coordinates
impl From<(u16, u16)> for Coordinates
source§fn from((x, y): (BlockSideLength, BlockSideLength)) -> Self
fn from((x, y): (BlockSideLength, BlockSideLength)) -> Self
Converts to this type from the input type.
source§impl Ord for Coordinates
impl Ord for Coordinates
source§fn cmp(&self, other: &Coordinates) -> Ordering
fn cmp(&self, other: &Coordinates) -> 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 Coordinates
impl PartialEq for Coordinates
source§fn eq(&self, other: &Coordinates) -> bool
fn eq(&self, other: &Coordinates) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Coordinates
impl PartialOrd for Coordinates
source§fn partial_cmp(&self, other: &Coordinates) -> Option<Ordering>
fn partial_cmp(&self, other: &Coordinates) -> 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 moresource§impl TypeInfo for Coordinates
impl TypeInfo for Coordinates
impl Copy for Coordinates
impl EncodeLike for Coordinates
impl Eq for Coordinates
impl StructuralPartialEq for Coordinates
Auto Trait Implementations§
impl Freeze for Coordinates
impl RefUnwindSafe for Coordinates
impl Send for Coordinates
impl Sync for Coordinates
impl Unpin for Coordinates
impl UnwindSafe for Coordinates
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
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>
fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>
Return an encoding of
Self
prepended by given slice.