[][src]Struct abi_stable::prefix_type::BoolArray

#[must_use = "BoolArray is returned by value by every mutating method."]
#[repr(transparent)]pub struct BoolArray<T> { /* fields omitted */ }

An array of 64 binary enums.

Implementations

impl<T> BoolArray<T>[src]

pub const fn with_count(count: usize) -> Self[src]

Creates a BoolArray where the first count elements are truthy.

pub const fn from_u64(bits: u64) -> Self[src]

Creates a BoolArray from a u64.

pub const fn empty() -> Self[src]

Creates a BoolArray where all elements are falsy.

pub const fn truncated(self, length: usize) -> Self[src]

Truncates self so that only the first length elements are truthy.

pub const fn bits(self) -> u64[src]

Converts this array to its underlying representation

pub const fn iter_count(self, count: usize) -> BoolArrayIter<T>

Notable traits for BoolArrayIter<T>

impl<T> Iterator for BoolArrayIter<T> where
    T: BooleanEnum, 
type Item = T;
[src]

An iterator over the first count elements of the array.

pub fn is_compatible(self, other: Self, count: usize) -> bool[src]

Whether this array is equal to other up to the count element.

impl BoolArray<IsAccessible>[src]

pub const fn is_accessible(self, index: usize) -> bool[src]

Queries whether the field at the index position is accessible.

pub const fn set_accessibility(self, index: usize, cond: IsAccessible) -> Self[src]

Sets the accessibility of a field based on cond, on IsAccessible::Yes the field becomes accessible, on IsAccessible::No the field becomes inaccessible.

impl BoolArray<IsConditional>[src]

pub const fn is_conditional(self, index: usize) -> bool[src]

Queries whether the field at the index position is conditional.

pub const fn set_conditionality(self, index: usize, cond: IsConditional) -> Self[src]

Sets the conditionality of a field based on cond, on IsConditional::Yes the field becomes conditional, on IsConditional::No the field becomes unconditional.

Trait Implementations

impl<T> Clone for BoolArray<T>[src]

impl<T> Copy for BoolArray<T>[src]

impl<T> Debug for BoolArray<T> where
    T: BooleanEnum, 
[src]

impl<T: Eq> Eq for BoolArray<T>[src]

impl<T> GetStaticEquivalent_ for BoolArray<T> where
    T: __StableAbi
[src]

type StaticEquivalent = _static_BoolArray<__GetStaticEquivalent<T>>

impl<T: PartialEq> PartialEq<BoolArray<T>> for BoolArray<T>[src]

impl<T> StableAbi for BoolArray<T> where
    T: __StableAbi
[src]

type IsNonZeroType = <u64 as __StableAbi>::IsNonZeroType

Whether this type has a single invalid bit-pattern. Read more

impl<T> StructuralEq for BoolArray<T>[src]

impl<T> StructuralPartialEq for BoolArray<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for BoolArray<T> where
    T: RefUnwindSafe

impl<T> Send for BoolArray<T> where
    T: Send

impl<T> Sync for BoolArray<T> where
    T: Sync

impl<T> Unpin for BoolArray<T> where
    T: Unpin

impl<T> UnwindSafe for BoolArray<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> BorrowOwned<'a> for T where
    T: 'a + Clone
[src]

type ROwned = T

The owned type, stored in RCow::Owned

type RBorrowed = &'a T

The borrowed type, stored in RCow::Borrowed

impl<T> From<T> for T[src]

impl<T> GetWithMetadata for T[src]

type ForSelf = WithMetadata_<T, T>

This is always WithMetadata_<Self, Self>

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SelfOps for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<This> TransmuteElement for This where
    This: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The error type returned when the conversion fails.

impl<T> TypeIdentity for T where
    T: ?Sized
[src]

type Type = T

The same type as Self. Read more

impl<This> ValidTag_Bounds for This where
    This: Debug + Clone + PartialEq<This>, 
[src]