Struct BlockStateRange
#[non_exhaustive]pub struct BlockStateRange { /* private fields */ }Expand description
States of one block in immutable definition order, not world numeric ID order.
Implementations§
§impl BlockStateRange
impl BlockStateRange
pub const fn new(
first: BlockState,
count: u32,
) -> Result<BlockStateRange, BlockStateError>
pub const fn new( first: BlockState, count: u32, ) -> Result<BlockStateRange, BlockStateError>
Construct a span, refusing a count that would exceed the u16 ordinal domain. Key/definition membership is checked by the metadata or write boundary that uses it.
pub const fn first(self) -> BlockState
pub const fn first(self) -> BlockState
The first API state, independent of world numeric IDs.
pub const fn contains(self, state: BlockState) -> bool
pub const fn contains(self, state: BlockState) -> bool
Whether both the block key and local ordinal belong to this span.
pub fn iter(self) -> impl ExactSizeIterator + DoubleEndedIterator
pub fn iter(self) -> impl ExactSizeIterator + DoubleEndedIterator
Every state in validated local ordinal order.
Trait Implementations§
§impl Clone for BlockStateRange
impl Clone for BlockStateRange
§fn clone(&self) -> BlockStateRange
fn clone(&self) -> BlockStateRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BlockStateRange
§impl Debug for BlockStateRange
impl Debug for BlockStateRange
impl Eq for BlockStateRange
§impl PartialEq for BlockStateRange
impl PartialEq for BlockStateRange
impl StructuralPartialEq for BlockStateRange
§impl Wire for BlockStateRange
impl Wire for BlockStateRange
Auto Trait Implementations§
impl Freeze for BlockStateRange
impl RefUnwindSafe for BlockStateRange
impl Send for BlockStateRange
impl Sync for BlockStateRange
impl Unpin for BlockStateRange
impl UnsafeUnpin for BlockStateRange
impl UnwindSafe for BlockStateRange
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