Struct Array

Source
pub struct Array<Offset: Unsigned, T, Rest>(/* private fields */);
Expand description

A type-fu linked list.

Trait Implementations§

Source§

impl<Offset: Unsigned, T, Rest> Default for Array<Offset, T, Rest>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<Offset: Unsigned, T: NonZero, Rest: IBitMask> IBitMask for Array<Offset, T, Rest>

Source§

const TUPLE: Self::Tuple

Expose the bitmask at runtime.
Source§

type Tuple = ((usize, usize), <Rest as IBitMask>::Tuple)

The type of the runtime-exposed mask.
Source§

type ByteAt<O: Unsigned> = <<Offset as IUnsigned>::Equal<O> as IBit>::UTernary<T, <Rest as IBitMask>::ByteAt<O>>

Self[O]
Source§

type BitAnd<Mask: IBitMask> = <<<T as IUnsigned>::BitAnd<<Mask as IBitMask>::ByteAt<Offset>> as IUnsigned>::Equal<UTerm> as IBit>::BmTernary<<Rest as IBitMask>::BitAnd<Mask>, Array<Offset, <<T as IUnsigned>::BitAnd<<Mask as IBitMask>::ByteAt<Offset>> as IUnsigned>::NonZero, <Rest as IBitMask>::BitAnd<Mask>>>

Self & T
Source§

type BitOr<Arr: IBitMask> = Array<Offset, T, <Rest as IBitMask>::BitOr<Arr>>

Self | T
Source§

type Shift<O: Unsigned> = Array<<Offset as IUnsigned>::Add<O>, T, <Rest as IBitMask>::Shift<O>>

Shift the bitmask by O bytes.
Source§

type HasFreeByteAt<O: Unsigned> = <<<O as IUnsigned>::Equal<Offset> as IBit>::And<<T as IUnsigned>::Equal<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B1>, B1>, B1>, B1>, B1>>> as IBit>::Or<<Rest as IBitMask>::HasFreeByteAt<O>>

Checks whether the mask is FF at index O
Source§

type ExtractBit = <<<T as IUnsigned>::AbsSub<<T as NonZero>::TruncateAtRightmostOne> as IUnsigned>::Greater<UTerm> as IBit>::BmTernary<Array<Offset, <<T as IUnsigned>::AbsSub<<T as NonZero>::TruncateAtRightmostOne> as IUnsigned>::NonZero, Rest>, Rest>

Remove the next bit that will be used as a determinant in enums.
Source§

type ExtractedBitByteOffset = Offset

Obtain the determinant’s offset in bytes.
Source§

type ExtractedBitMask = <T as NonZero>::TruncateAtRightmostOne

Obtain the determinant’s mask.
Source§

impl<Offset: Unsigned, T: Unsigned, Rest: IForbiddenValues> IForbiddenValues for Array<Offset, T, Rest>

Source§

type Shift<O: Unsigned> = Array<<Offset as IUnsigned>::Add<O>, T, <Rest as IForbiddenValues>::Shift<O>>

Shift all values in the set by O bytes
Source§

type Or<O: IForbiddenValues> = Or<O, Array<Offset, T, Rest>>

union(Self, T)
Source§

type SelectFrom<Mask: IBitMask> = <<<Mask as IBitMask>::HasFreeByteAt<Offset> as IBitBase>::AsForbiddenValue as ISingleForbiddenValue>::And<<<Rest as IForbiddenValues>::SelectFrom<Mask> as ISingleForbiddenValue>::Push<Offset, T>>

Extract a single forbidden value that fits within Mask
Source§

type SelectOne = Array<Offset, T, <Rest as IForbiddenValues>::SelectOne>

Extract the first available forbidden value.
Source§

unsafe fn is_invalid(ptr: *const u8) -> bool

Returns true if ptr points to a forbidden value. Read more
Source§

impl<Offset: Unsigned, T, Rest: ISingleForbiddenValue> ISingleForbiddenValue for Array<Offset, T, Rest>

Source§

type Push<O: Unsigned, V> = Array<O, V, Array<Offset, T, Rest>>

Add a byte to the forbidden value.
Source§

type Or<V: ISingleForbiddenValue> = Array<Offset, T, Rest>

Self == End ? T : Self
Source§

type And<V: ISingleForbiddenValue> = V

T == End ? Self : T
Source§

type Resolve = Array<Offset, T, Rest>

Turns Saturators into End.
Source§

impl<O: Unsigned, T, R: IBitMask> Includes<Array<O, T, R>> for End

Source§

type Output = End

The result
Source§

impl<O1: Unsigned, T1, R1, O2: Unsigned, T2, R2: IBitMask> Includes<Array<O1, T1, R1>> for Array<O2, T2, R2>
where Array<O2, T2, R2>: IncludesComputer<(O1, T1)> + Includes<R1>, R1: IsEnd + IBitMask, <Self as Includes<R1>>::Output: IsEnd, (<Self as IncludesComputer<(O1, T1)>>::Output, <Self as Includes<R1>>::Output, <<Self as Includes<R1>>::Output as IsEnd>::Output, <R1 as IsEnd>::Output): Arrayify,

Source§

type Output = <(<Array<O2, T2, R2> as IncludesComputer<(O1, T1)>>::Output, <Array<O2, T2, R2> as Includes<R1>>::Output, <<Array<O2, T2, R2> as Includes<R1>>::Output as IsEnd>::Output, <R1 as IsEnd>::Output) as Arrayify>::Output

The result
Source§

impl<O1: Unsigned, T1, O2: Unsigned, T2, R2: IBitMask> IncludesComputer<(O1, T1)> for Array<O2, T2, R2>
where Self: IncludesComputer<(O1, T1, <O1 as Unsigned>::Equal<O2>)>,

Source§

type Output = <Array<O2, T2, R2> as IncludesComputer<(O1, T1, <O1 as IUnsigned>::Equal<O2>)>>::Output

Support for stabby computations
Source§

impl<O1: Unsigned, T1, O2: Unsigned, T2, R2> IncludesComputer<(O1, T1, B0)> for Array<O2, T2, R2>

Source§

type Output = <R2 as IncludesComputer<(O1, T1)>>::Output

Support for stabby computations
Source§

impl<O1: Unsigned, T1, O2: Unsigned, T2: Unsigned, R2: IBitMask> IncludesComputer<(O1, T1, B1)> for Array<O2, T2, R2>
where Self: IncludesComputer<(O1, T1, B1, <T2 as Unsigned>::Equal<U255>)>,

Source§

type Output = <Array<O2, T2, R2> as IncludesComputer<(O1, T1, B1, <T2 as IUnsigned>::Equal<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B1>, B1>, B1>, B1>, B1>>)>>::Output

Support for stabby computations
Source§

impl<O1: Unsigned, T1, O2: Unsigned, T2, R2: IBitMask> IncludesComputer<(O1, T1, B1, B0)> for Array<O2, T2, R2>

Source§

type Output = End

Support for stabby computations
Source§

impl<O1: Unsigned, T1, O2: Unsigned, T2, R2: IBitMask> IncludesComputer<(O1, T1, B1, B1)> for Array<O2, T2, R2>

Source§

type Output = (O1, T1)

Support for stabby computations
Source§

impl<Offset: Unsigned, Value: Unsigned, Tail: IForbiddenValues + IntoValueIsErr> IntoValueIsErr for Array<Offset, Value, Tail>

Source§

type ValueIsErr = ValueIsErr<Offset, Value, <Tail as IntoValueIsErr>::ValueIsErr>

The coerced type.
Source§

impl<O: Unsigned, T, R: IBitMask> IsEnd for Array<O, T, R>

Source§

type Output = B0

The result

Auto Trait Implementations§

§

impl<Offset, T, Rest> Freeze for Array<Offset, T, Rest>

§

impl<Offset, T, Rest> RefUnwindSafe for Array<Offset, T, Rest>
where Offset: RefUnwindSafe, T: RefUnwindSafe, Rest: RefUnwindSafe,

§

impl<Offset, T, Rest> Send for Array<Offset, T, Rest>
where Offset: Send, T: Send, Rest: Send,

§

impl<Offset, T, Rest> Sync for Array<Offset, T, Rest>
where Offset: Sync, T: Sync, Rest: Sync,

§

impl<Offset, T, Rest> Unpin for Array<Offset, T, Rest>
where Offset: Unpin, T: Unpin, Rest: Unpin,

§

impl<Offset, T, Rest> UnwindSafe for Array<Offset, T, Rest>
where Offset: UnwindSafe, T: UnwindSafe, Rest: UnwindSafe,

Blanket Implementations§

Source§

impl<Source> AccessAs for Source

Source§

fn ref_as<T>(&self) -> <Source as IGuardRef<T>>::Guard<'_>
where Source: IGuardRef<T>, T: ?Sized,

Provides immutable access to a type as if it were its ABI-unstable equivalent.
Source§

fn mut_as<T>(&mut self) -> <Source as IGuardMut<T>>::GuardMut<'_>
where Source: IGuardMut<T>, T: ?Sized,

Provides mutable access to a type as if it were its ABI-unstable equivalent.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, As> IGuardMut<As> for T
where T: Into<As>, As: Into<T>,

Source§

type GuardMut<'a> = MutAs<'a, T, As> where T: 'a

The type of the guard which will clean up the temporary after applying its changes to the original.
Source§

fn guard_mut_inner(&mut self) -> <T as IGuardMut<As>>::GuardMut<'_>

Construct the temporary and guard it through a mutable reference.
Source§

impl<T, As> IGuardRef<As> for T
where T: Into<As>, As: Into<T>,

Source§

type Guard<'a> = RefAs<'a, T, As> where T: 'a

The type of the guard which will clean up the temporary.
Source§

fn guard_ref_inner(&self) -> <T as IGuardRef<As>>::Guard<'_>

Construct the temporary and guard it through an immutable reference.
Source§

impl<T> Includes<End> for T

Source§

type Output = End

The result
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.