Struct FixedBitSet
pub struct FixedBitSet { /* private fields */ }Expand description
FixedBitSet is a simple fixed size set of bits that each can
be enabled (1 / true) or disabled (0 / false).
The bit set has a fixed capacity in terms of enabling bits (and the
capacity can grow using the grow method).
Derived traits depend on both the zeros and ones, so [0,1] is not equal to [0,1,0].
Implementations§
§impl FixedBitSet
impl FixedBitSet
pub const fn new() -> FixedBitSet
pub const fn new() -> FixedBitSet
Create a new empty FixedBitSet.
pub fn with_capacity(bits: usize) -> FixedBitSet
pub fn with_capacity(bits: usize) -> FixedBitSet
Create a new FixedBitSet with a specific number of bits, all initially clear.
pub fn with_capacity_and_blocks<I>(bits: usize, blocks: I) -> FixedBitSetwhere
I: IntoIterator<Item = usize>,
pub fn with_capacity_and_blocks<I>(bits: usize, blocks: I) -> FixedBitSetwhere
I: IntoIterator<Item = usize>,
Create a new FixedBitSet with a specific number of bits, initialized from provided blocks.
If the blocks are not the exact size needed for the capacity they will be padded with zeros (if shorter) or truncated to the capacity (if longer).
For example:
let data = vec![4];
let bs = fixedbitset::FixedBitSet::with_capacity_and_blocks(4, data);
assert_eq!(format!("{:b}", bs), "0010");pub fn grow_and_insert(&mut self, bits: usize)
pub fn grow_and_insert(&mut self, bits: usize)
Grows the internal size of the bitset before inserting a bit
Unlike insert, this cannot panic, but may allocate if the bit is outside of the existing buffer’s range.
This is faster than calling grow then insert in succession.
pub fn len(&self) -> usize
pub fn len(&self) -> usize
The length of the FixedBitSet in bits.
Note: len includes both set and unset bits.
let bitset = FixedBitSet::with_capacity(10);
// there are 0 set bits, but 10 unset bits
assert_eq!(bitset.len(), 10);len does not return the count of set bits. For that, use
bitset.count_ones(..) instead.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
true if the FixedBitSet is empty.
Note that an “empty” FixedBitSet is a FixedBitSet with
no bits (meaning: it’s length is zero). If you want to check
if all bits are unset, use FixedBitSet::is_clear.
let bitset = FixedBitSet::with_capacity(10);
assert!(!bitset.is_empty());
let bitset = FixedBitSet::with_capacity(0);
assert!(bitset.is_empty());pub fn is_clear(&self) -> bool
pub fn is_clear(&self) -> bool
true if all bits in the FixedBitSet are unset.
As opposed to FixedBitSet::is_empty, which is true only for
sets without any bits, set or unset.
let mut bitset = FixedBitSet::with_capacity(10);
assert!(bitset.is_clear());
bitset.insert(2);
assert!(!bitset.is_clear());This is equivalent to bitset.count_ones(..) == 0.
pub fn minimum(&self) -> Option<usize>
pub fn minimum(&self) -> Option<usize>
Finds the lowest set bit in the bitset.
Returns None if there aren’t any set bits.
let mut bitset = FixedBitSet::with_capacity(10);
assert_eq!(bitset.minimum(), None);
bitset.insert(2);
assert_eq!(bitset.minimum(), Some(2));
bitset.insert(8);
assert_eq!(bitset.minimum(), Some(2));pub fn maximum(&self) -> Option<usize>
pub fn maximum(&self) -> Option<usize>
Finds the highest set bit in the bitset.
Returns None if there aren’t any set bits.
let mut bitset = FixedBitSet::with_capacity(10);
assert_eq!(bitset.maximum(), None);
bitset.insert(8);
assert_eq!(bitset.maximum(), Some(8));
bitset.insert(2);
assert_eq!(bitset.maximum(), Some(8));pub fn is_full(&self) -> bool
pub fn is_full(&self) -> bool
true if all bits in the FixedBitSet are set.
let mut bitset = FixedBitSet::with_capacity(10);
assert!(!bitset.is_full());
bitset.insert_range(..);
assert!(bitset.is_full());This is equivalent to bitset.count_ones(..) == bitset.len().
pub fn contains(&self, bit: usize) -> bool
pub fn contains(&self, bit: usize) -> bool
Return true if the bit is enabled in the FixedBitSet, false otherwise.
Note: bits outside the capacity are always disabled.
Note: Also available with index syntax: bitset[bit].
pub unsafe fn contains_unchecked(&self, bit: usize) -> bool
pub unsafe fn contains_unchecked(&self, bit: usize) -> bool
Return true if the bit is enabled in the FixedBitSet, false otherwise.
Note: unlike contains, calling this with an invalid bit
is undefined behavior.
§Safety
bit must be less than self.len()
pub fn clear(&mut self)
pub fn clear(&mut self)
Clear all bits.
pub unsafe fn insert_unchecked(&mut self, bit: usize)
pub unsafe fn insert_unchecked(&mut self, bit: usize)
pub unsafe fn remove_unchecked(&mut self, bit: usize)
pub unsafe fn remove_unchecked(&mut self, bit: usize)
pub fn put(&mut self, bit: usize) -> bool
pub fn put(&mut self, bit: usize) -> bool
Enable bit, and return its previous value.
Panics if bit is out of bounds.
pub unsafe fn put_unchecked(&mut self, bit: usize) -> bool
pub unsafe fn put_unchecked(&mut self, bit: usize) -> bool
Enable bit, and return its previous value without doing any bounds checking.
§Safety
bit must be less than self.len()
pub fn toggle(&mut self, bit: usize)
pub fn toggle(&mut self, bit: usize)
Toggle bit (inverting its state).
Panics if bit is out of bounds
pub unsafe fn toggle_unchecked(&mut self, bit: usize)
pub unsafe fn toggle_unchecked(&mut self, bit: usize)
Toggle bit (inverting its state) without any bounds checking.
§Safety
bit must be less than self.len()
pub fn set(&mut self, bit: usize, enabled: bool)
pub fn set(&mut self, bit: usize, enabled: bool)
Sets a bit to the provided enabled value.
Panics if bit is out of bounds.
pub unsafe fn set_unchecked(&mut self, bit: usize, enabled: bool)
pub unsafe fn set_unchecked(&mut self, bit: usize, enabled: bool)
Sets a bit to the provided enabled value without doing any bounds checking.
§Safety
bit must be less than self.len()
pub fn copy_bit(&mut self, from: usize, to: usize)
pub fn copy_bit(&mut self, from: usize, to: usize)
Copies boolean value from specified bit to the specified bit.
If from is out-of-bounds, to will be unset.
Panics if to is out of bounds.
pub unsafe fn copy_bit_unchecked(&mut self, from: usize, to: usize)
pub unsafe fn copy_bit_unchecked(&mut self, from: usize, to: usize)
Copies boolean value from specified bit to the specified bit.
Note: unlike copy_bit, calling this with an invalid from
is undefined behavior.
§Safety
to must both be less than self.len()
pub fn count_ones<T>(&self, range: T) -> usizewhere
T: IndexRange,
pub fn count_ones<T>(&self, range: T) -> usizewhere
T: IndexRange,
Count the number of set bits in the given bit range.
This function is potentially much faster than using ones(other).count().
Use .. to count the whole content of the bitset.
Panics if the range extends past the end of the bitset.
pub fn count_zeroes<T>(&self, range: T) -> usizewhere
T: IndexRange,
pub fn count_zeroes<T>(&self, range: T) -> usizewhere
T: IndexRange,
Count the number of unset bits in the given bit range.
This function is potentially much faster than using zeroes(other).count().
Use .. to count the whole content of the bitset.
Panics if the range extends past the end of the bitset.
pub fn set_range<T>(&mut self, range: T, enabled: bool)where
T: IndexRange,
pub fn set_range<T>(&mut self, range: T, enabled: bool)where
T: IndexRange,
Sets every bit in the given range to the given state (enabled)
Use .. to set the whole bitset.
Panics if the range extends past the end of the bitset.
pub fn insert_range<T>(&mut self, range: T)where
T: IndexRange,
pub fn insert_range<T>(&mut self, range: T)where
T: IndexRange,
Enables every bit in the given range.
Use .. to make the whole bitset ones.
Panics if the range extends past the end of the bitset.
pub fn remove_range<T>(&mut self, range: T)where
T: IndexRange,
pub fn remove_range<T>(&mut self, range: T)where
T: IndexRange,
Disables every bit in the given range.
Use .. to make the whole bitset ones.
Panics if the range extends past the end of the bitset.
pub fn toggle_range<T>(&mut self, range: T)where
T: IndexRange,
pub fn toggle_range<T>(&mut self, range: T)where
T: IndexRange,
Toggles (inverts) every bit in the given range.
Use .. to toggle the whole bitset.
Panics if the range extends past the end of the bitset.
pub fn contains_all_in_range<T>(&self, range: T) -> boolwhere
T: IndexRange,
pub fn contains_all_in_range<T>(&self, range: T) -> boolwhere
T: IndexRange,
Checks if the bitset contains every bit in the given range.
Panics if the range extends past the end of the bitset.
pub fn contains_any_in_range<T>(&self, range: T) -> boolwhere
T: IndexRange,
pub fn contains_any_in_range<T>(&self, range: T) -> boolwhere
T: IndexRange,
Checks if the bitset contains at least one set bit in the given range.
Panics if the range extends past the end of the bitset.
pub fn as_mut_slice(&mut self) -> &mut [usize]
pub fn as_mut_slice(&mut self) -> &mut [usize]
View the bitset as a mutable slice of Block blocks. Writing past the bitlength in the last
will cause contains to return potentially incorrect results for bits past the bitlength.
pub fn ones(&self) -> Ones<'_>
pub fn ones(&self) -> Ones<'_>
Iterates over all enabled bits.
Iterator element is the index of the 1 bit, type usize.
pub fn into_ones(self) -> IntoOnes
pub fn into_ones(self) -> IntoOnes
Iterates over all enabled bits.
Iterator element is the index of the 1 bit, type usize.
Unlike ones, this function consumes the FixedBitset.
pub fn zeroes(&self) -> Zeroes<'_>
pub fn zeroes(&self) -> Zeroes<'_>
Iterates over all disabled bits.
Iterator element is the index of the 0 bit, type usize.
pub fn intersection<'a>(&'a self, other: &'a FixedBitSet) -> Intersection<'a>
pub fn intersection<'a>(&'a self, other: &'a FixedBitSet) -> Intersection<'a>
Returns a lazy iterator over the intersection of two FixedBitSets
pub fn union<'a>(&'a self, other: &'a FixedBitSet) -> Union<'a>
pub fn union<'a>(&'a self, other: &'a FixedBitSet) -> Union<'a>
Returns a lazy iterator over the union of two FixedBitSets.
pub fn difference<'a>(&'a self, other: &'a FixedBitSet) -> Difference<'a>
pub fn difference<'a>(&'a self, other: &'a FixedBitSet) -> Difference<'a>
Returns a lazy iterator over the difference of two FixedBitSets. The difference of a
and b is the elements of a which are not in b.
pub fn symmetric_difference<'a>(
&'a self,
other: &'a FixedBitSet,
) -> SymmetricDifference<'a>
pub fn symmetric_difference<'a>( &'a self, other: &'a FixedBitSet, ) -> SymmetricDifference<'a>
Returns a lazy iterator over the symmetric difference of two FixedBitSets.
The symmetric difference of a and b is the elements of one, but not both, sets.
pub fn union_with(&mut self, other: &FixedBitSet)
pub fn union_with(&mut self, other: &FixedBitSet)
In-place union of two FixedBitSets.
On calling this method, self’s capacity may be increased to match other’s.
pub fn intersect_with(&mut self, other: &FixedBitSet)
pub fn intersect_with(&mut self, other: &FixedBitSet)
In-place intersection of two FixedBitSets.
On calling this method, self’s capacity will remain the same as before.
pub fn difference_with(&mut self, other: &FixedBitSet)
pub fn difference_with(&mut self, other: &FixedBitSet)
In-place difference of two FixedBitSets.
On calling this method, self’s capacity will remain the same as before.
pub fn symmetric_difference_with(&mut self, other: &FixedBitSet)
pub fn symmetric_difference_with(&mut self, other: &FixedBitSet)
In-place symmetric difference of two FixedBitSets.
On calling this method, self’s capacity may be increased to match other’s.
pub fn union_count(&self, other: &FixedBitSet) -> usize
pub fn union_count(&self, other: &FixedBitSet) -> usize
Computes how many bits would be set in the union between two bitsets.
This is potentially much faster than using union(other).count(). Unlike
other methods like using [union_with] followed by [count_ones], this
does not mutate in place or require separate allocations.
pub fn intersection_count(&self, other: &FixedBitSet) -> usize
pub fn intersection_count(&self, other: &FixedBitSet) -> usize
Computes how many bits would be set in the intersection between two bitsets.
This is potentially much faster than using intersection(other).count(). Unlike
other methods like using [intersect_with] followed by [count_ones], this
does not mutate in place or require separate allocations.
pub fn difference_count(&self, other: &FixedBitSet) -> usize
pub fn difference_count(&self, other: &FixedBitSet) -> usize
Computes how many bits would be set in the difference between two bitsets.
This is potentially much faster than using difference(other).count(). Unlike
other methods like using [difference_with] followed by [count_ones], this
does not mutate in place or require separate allocations.
pub fn symmetric_difference_count(&self, other: &FixedBitSet) -> usize
pub fn symmetric_difference_count(&self, other: &FixedBitSet) -> usize
Computes how many bits would be set in the symmetric difference between two bitsets.
This is potentially much faster than using symmetric_difference(other).count(). Unlike
other methods like using [symmetric_difference_with] followed by [count_ones], this
does not mutate in place or require separate allocations.
pub fn is_disjoint(&self, other: &FixedBitSet) -> bool
pub fn is_disjoint(&self, other: &FixedBitSet) -> bool
Returns true if self has no elements in common with other. This
is equivalent to checking for an empty intersection.
pub fn is_subset(&self, other: &FixedBitSet) -> bool
pub fn is_subset(&self, other: &FixedBitSet) -> bool
Returns true if the set is a subset of another, i.e. other contains
at least all the values in self.
pub fn is_superset(&self, other: &FixedBitSet) -> bool
pub fn is_superset(&self, other: &FixedBitSet) -> bool
Returns true if the set is a superset of another, i.e. self contains
at least all the values in other.
Trait Implementations§
§impl Binary for FixedBitSet
impl Binary for FixedBitSet
§impl<'a> BitAnd for &'a FixedBitSet
impl<'a> BitAnd for &'a FixedBitSet
§type Output = FixedBitSet
type Output = FixedBitSet
& operator.§fn bitand(self, other: &FixedBitSet) -> FixedBitSet
fn bitand(self, other: &FixedBitSet) -> FixedBitSet
& operation. Read more§impl BitAndAssign<&FixedBitSet> for FixedBitSet
impl BitAndAssign<&FixedBitSet> for FixedBitSet
§fn bitand_assign(&mut self, other: &FixedBitSet)
fn bitand_assign(&mut self, other: &FixedBitSet)
&= operation. Read more§impl BitAndAssign for FixedBitSet
impl BitAndAssign for FixedBitSet
§fn bitand_assign(&mut self, other: FixedBitSet)
fn bitand_assign(&mut self, other: FixedBitSet)
&= operation. Read more§impl<'a> BitOr for &'a FixedBitSet
impl<'a> BitOr for &'a FixedBitSet
§type Output = FixedBitSet
type Output = FixedBitSet
| operator.§fn bitor(self, other: &FixedBitSet) -> FixedBitSet
fn bitor(self, other: &FixedBitSet) -> FixedBitSet
| operation. Read more§impl BitOrAssign<&FixedBitSet> for FixedBitSet
impl BitOrAssign<&FixedBitSet> for FixedBitSet
§fn bitor_assign(&mut self, other: &FixedBitSet)
fn bitor_assign(&mut self, other: &FixedBitSet)
|= operation. Read more§impl BitOrAssign for FixedBitSet
impl BitOrAssign for FixedBitSet
§fn bitor_assign(&mut self, other: FixedBitSet)
fn bitor_assign(&mut self, other: FixedBitSet)
|= operation. Read more§impl<'a> BitXor for &'a FixedBitSet
impl<'a> BitXor for &'a FixedBitSet
§type Output = FixedBitSet
type Output = FixedBitSet
^ operator.§fn bitxor(self, other: &FixedBitSet) -> FixedBitSet
fn bitxor(self, other: &FixedBitSet) -> FixedBitSet
^ operation. Read more§impl BitXorAssign<&FixedBitSet> for FixedBitSet
impl BitXorAssign<&FixedBitSet> for FixedBitSet
§fn bitxor_assign(&mut self, other: &FixedBitSet)
fn bitxor_assign(&mut self, other: &FixedBitSet)
^= operation. Read more§impl BitXorAssign for FixedBitSet
impl BitXorAssign for FixedBitSet
§fn bitxor_assign(&mut self, other: FixedBitSet)
fn bitxor_assign(&mut self, other: FixedBitSet)
^= operation. Read more§impl Clone for FixedBitSet
impl Clone for FixedBitSet
§fn clone(&self) -> FixedBitSet
fn clone(&self) -> FixedBitSet
§fn clone_from(&mut self, source: &FixedBitSet)
fn clone_from(&mut self, source: &FixedBitSet)
source. Read more§impl Debug for FixedBitSet
impl Debug for FixedBitSet
§impl Default for FixedBitSet
impl Default for FixedBitSet
§fn default() -> FixedBitSet
fn default() -> FixedBitSet
§impl Display for FixedBitSet
impl Display for FixedBitSet
§impl Drop for FixedBitSet
impl Drop for FixedBitSet
§impl Extend<usize> for FixedBitSet
Sets the bit at index i to true for each item i in the input src.
impl Extend<usize> for FixedBitSet
Sets the bit at index i to true for each item i in the input src.
§fn extend<I>(&mut self, src: I)where
I: IntoIterator<Item = usize>,
fn extend<I>(&mut self, src: I)where
I: IntoIterator<Item = usize>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<N> FilterNode<N> for &FixedBitSetwhere
FixedBitSet: VisitMap<N>,
impl<N> FilterNode<N> for &FixedBitSetwhere
FixedBitSet: VisitMap<N>,
Source§fn include_node(&self, n: N) -> bool
fn include_node(&self, n: N) -> bool
Source§impl<N> FilterNode<N> for FixedBitSetwhere
FixedBitSet: VisitMap<N>,
This filter includes the nodes that are contained in the set.
impl<N> FilterNode<N> for FixedBitSetwhere
FixedBitSet: VisitMap<N>,
This filter includes the nodes that are contained in the set.
Source§fn include_node(&self, n: N) -> bool
fn include_node(&self, n: N) -> bool
§impl FromIterator<usize> for FixedBitSet
Return a FixedBitSet containing bits set to true for every bit index in
the iterator, other bits are set to false.
impl FromIterator<usize> for FixedBitSet
Return a FixedBitSet containing bits set to true for every bit index in the iterator, other bits are set to false.
§fn from_iter<I>(src: I) -> FixedBitSetwhere
I: IntoIterator<Item = usize>,
fn from_iter<I>(src: I) -> FixedBitSetwhere
I: IntoIterator<Item = usize>,
§impl Hash for FixedBitSet
impl Hash for FixedBitSet
§impl Index<usize> for FixedBitSet
Return true if the bit is enabled in the bitset,
or false otherwise.
impl Index<usize> for FixedBitSet
Return true if the bit is enabled in the bitset, or false otherwise.
Note: bits outside the capacity are always disabled, and thus indexing a FixedBitSet will not panic.
§impl Ord for FixedBitSet
impl Ord for FixedBitSet
§fn cmp(&self, other: &FixedBitSet) -> Ordering
fn cmp(&self, other: &FixedBitSet) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for FixedBitSet
impl PartialEq for FixedBitSet
§impl PartialOrd for FixedBitSet
impl PartialOrd for FixedBitSet
Source§impl<Ix> VisitMap<Ix> for FixedBitSetwhere
Ix: IndexType,
impl<Ix> VisitMap<Ix> for FixedBitSetwhere
Ix: IndexType,
impl Eq for FixedBitSet
impl Send for FixedBitSet
impl Sync for FixedBitSet
Auto Trait Implementations§
impl Freeze for FixedBitSet
impl RefUnwindSafe for FixedBitSet
impl Unpin for FixedBitSet
impl UnsafeUnpin for FixedBitSet
impl UnwindSafe for FixedBitSet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§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
key and return true if they are equal.§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
§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
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.