Struct minedmap_types::BlockCoord
source · pub struct BlockCoord<const AXIS: u8>(pub u8);Expand description
A block coordinate relative to a chunk
Tuple Fields§
§0: u8Implementations§
source§impl<const AXIS: u8> BlockCoord<AXIS>
impl<const AXIS: u8> BlockCoord<AXIS>
sourcepub fn new<T: TryInto<u8>>(value: T) -> Self
pub fn new<T: TryInto<u8>>(value: T) -> Self
Constructs a new value
Will panic if the value is not in the valid range
sourcepub fn iter(
) -> impl Iterator<Item = BlockCoord<AXIS>> + DoubleEndedIterator + ExactSizeIterator + FusedIterator + Clone + Debug
pub fn iter( ) -> impl Iterator<Item = BlockCoord<AXIS>> + DoubleEndedIterator + ExactSizeIterator + FusedIterator + Clone + Debug
Returns an iterator over all possible values of the type
Trait Implementations§
source§impl<const AXIS: u8> Clone for BlockCoord<AXIS>
impl<const AXIS: u8> Clone for BlockCoord<AXIS>
source§fn clone(&self) -> BlockCoord<AXIS>
fn clone(&self) -> BlockCoord<AXIS>
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<const AXIS: u8> Debug for BlockCoord<AXIS>
impl<const AXIS: u8> Debug for BlockCoord<AXIS>
source§impl<const AXIS: u8> PartialEq for BlockCoord<AXIS>
impl<const AXIS: u8> PartialEq for BlockCoord<AXIS>
source§fn eq(&self, other: &BlockCoord<AXIS>) -> bool
fn eq(&self, other: &BlockCoord<AXIS>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<const AXIS: u8> Copy for BlockCoord<AXIS>
impl<const AXIS: u8> Eq for BlockCoord<AXIS>
impl<const AXIS: u8> StructuralEq for BlockCoord<AXIS>
impl<const AXIS: u8> StructuralPartialEq for BlockCoord<AXIS>
Auto Trait Implementations§
impl<const AXIS: u8> RefUnwindSafe for BlockCoord<AXIS>
impl<const AXIS: u8> Send for BlockCoord<AXIS>
impl<const AXIS: u8> Sync for BlockCoord<AXIS>
impl<const AXIS: u8> Unpin for BlockCoord<AXIS>
impl<const AXIS: u8> UnwindSafe for BlockCoord<AXIS>
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