pub struct CollectionCountPredicate<P> {
test: P,
count: IntBounds,
}Expand description
One element predicate and the accepted number of matching elements.
Fields§
§test: P§count: IntBoundsImplementations§
Source§impl<P> CollectionCountPredicate<P>
impl<P> CollectionCountPredicate<P>
pub const fn new(test: P, count: IntBounds) -> Self
pub const fn test(&self) -> &P
pub const fn count(&self) -> IntBounds
fn from_nbt_with( tag: &NbtTag, decode: impl Fn(&NbtTag) -> Option<P>, ) -> Option<Self>
fn to_nbt_with(&self, encode: impl Fn(&P) -> NbtTag) -> NbtTag
fn hash_with(&self, hasher: &mut ComponentHasher, hash: impl Fn(&P) -> i32)
Trait Implementations§
Source§impl<P: Clone> Clone for CollectionCountPredicate<P>
impl<P: Clone> Clone for CollectionCountPredicate<P>
Source§fn clone(&self) -> CollectionCountPredicate<P>
fn clone(&self) -> CollectionCountPredicate<P>
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 moreSource§impl<P: Debug> Debug for CollectionCountPredicate<P>
impl<P: Debug> Debug for CollectionCountPredicate<P>
Source§impl<P: PartialEq> PartialEq for CollectionCountPredicate<P>
impl<P: PartialEq> PartialEq for CollectionCountPredicate<P>
impl<P: PartialEq> StructuralPartialEq for CollectionCountPredicate<P>
Auto Trait Implementations§
impl<P> Freeze for CollectionCountPredicate<P>where
P: Freeze,
impl<P> RefUnwindSafe for CollectionCountPredicate<P>where
P: RefUnwindSafe,
impl<P> Send for CollectionCountPredicate<P>where
P: Send,
impl<P> Sync for CollectionCountPredicate<P>where
P: Sync,
impl<P> Unpin for CollectionCountPredicate<P>where
P: Unpin,
impl<P> UnsafeUnpin for CollectionCountPredicate<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for CollectionCountPredicate<P>where
P: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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<>>