pub struct CarverReplaceableStates {
states: Box<[bool]>,
}Expand description
Per-state membership cache for a carver’s replaceable block tag.
Vanilla tests a block-state predicate for every candidate block. Steel’s registry stores tags by block key, so resolving that predicate once into a state-id table avoids repeated tag/hash lookups in the carve loop while preserving the configured tag as the source of truth.
Fields§
§states: Box<[bool]>Implementations§
Source§impl CarverReplaceableStates
impl CarverReplaceableStates
fn build(tag: &Identifier) -> Self
Sourcepub fn contains(&self, state: BlockStateId) -> bool
pub fn contains(&self, state: BlockStateId) -> bool
Returns whether state belongs to this cached replaceable set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CarverReplaceableStates
impl RefUnwindSafe for CarverReplaceableStates
impl Send for CarverReplaceableStates
impl Sync for CarverReplaceableStates
impl Unpin for CarverReplaceableStates
impl UnsafeUnpin for CarverReplaceableStates
impl UnwindSafe for CarverReplaceableStates
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>