abi_stable::prefix_type

Type Alias FieldConditionality

Source
pub type FieldConditionality = BitArray64<IsConditional>;
Expand description

An array with whether the ith field in the prefix of a prefix-type is conditional,which means whether it has the #[sabi(accessible_if = expression)] attribute applied to it.

Aliased Type§

struct FieldConditionality { /* private fields */ }

Implementations

Source§

impl<E> BitArray64<E>

Source

pub const fn at(self, index: usize) -> E
where E: BooleanEnum,

Gets the value of E at index

§Panics

This function panics if index >= 64

Source

pub const fn set(self, index: usize, value: E) -> Self
where E: BooleanEnum,

Sets the value at index to value

§Panics

This function panics if index >= 64

Source§

impl<E> BitArray64<E>

Source

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

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

Source

pub const fn bits(self) -> u64

Converts this array to its underlying representation

Source

pub fn iter(self) -> BitArray64Iter<E>

An iterator over the first count elements of the array.

Source

pub fn eq(self, other: Self, count: usize) -> bool

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

Source§

impl<E> BitArray64<E>

Source

pub const fn with_count(count: usize) -> Self
where E: BooleanEnum,

Creates a BitArray64 where the first count elements are truthy.

Source

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

Creates a BitArray64 from a u64.

Source

pub const fn empty() -> Self

Creates a BitArray64 where all elements are falsy.

Trait Implementations

Source§

impl<E> Clone for BitArray64<E>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E> Debug for BitArray64<E>
where E: BooleanEnum,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<E> GetStaticEquivalent_ for BitArray64<E>
where E: __StableAbi,

Source§

type StaticEquivalent = _static_BitArray64<<E as GetStaticEquivalent_>::StaticEquivalent>

The 'static equivalent of Self
Source§

impl<E: PartialEq> PartialEq for BitArray64<E>

Source§

fn eq(&self, other: &BitArray64<E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<E> StableAbi for BitArray64<E>
where E: __StableAbi,

Source§

const LAYOUT: &'static TypeLayout = _

The layout of the type provided by implementors.
Source§

type IsNonZeroType = <u64 as StableAbi>::IsNonZeroType

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

const ABI_CONSTS: AbiConsts = _

const-equivalents of the associated types.
Source§

impl<E> Copy for BitArray64<E>

Source§

impl<E: Eq> Eq for BitArray64<E>

Source§

impl<E> StructuralPartialEq for BitArray64<E>