Skip to main content

P4

Struct P4 

Source
pub struct P4<TY, const A: usize, const B: usize, const C: usize, const D: usize>(pub TY);
Expand description

Type wrapper with 4 const generic parameters

Tuple Fields§

§0: TY

Implementations§

Source§

impl<TY, const AN: usize, const BN: usize, const CN: usize, const DN: usize> P4<TY, AN, BN, CN, DN>

Source

pub const SUM: usize

Trait Implementations§

Source§

impl<TY: Clone, const A: usize, const B: usize, const C: usize, const D: usize> Clone for P4<TY, A, B, C, D>

Source§

fn clone(&self) -> P4<TY, A, B, C, D>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<TY: Debug, const A: usize, const B: usize, const C: usize, const D: usize> Debug for P4<TY, A, B, C, D>

Source§

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

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

impl<TY: Eq, const A: usize, const B: usize, const C: usize, const D: usize> Eq for P4<TY, A, B, C, D>

Source§

impl<T, U, const AN: usize, const BN: usize, const CN: usize, const DN: usize> From<P4<T, AN, BN, CN, DN>> for Lsb<U>
where U: FromLsb<P4<T, AN, BN, CN, DN>>,

Source§

fn from(data: P4<T, AN, BN, CN, DN>) -> Self

Converts to this type from the input type.
Source§

impl<T, U, const AN: usize, const BN: usize, const CN: usize, const DN: usize> From<P4<T, AN, BN, CN, DN>> for Msb<U>
where U: FromMsb<P4<T, AN, BN, CN, DN>>,

Source§

fn from(data: P4<T, AN, BN, CN, DN>) -> Self

Converts to this type from the input type.
Source§

impl<TY, A, B, C, D, const NU: usize, const AN: usize, const BN: usize, const CN: usize, const DN: usize> From<P4<[TY; NU], AN, BN, CN, DN>> for (A, B, C, D)
where TY: Copy + Default, A: From<[TY; AN]>, B: From<[TY; BN]>, C: From<[TY; CN]>, D: From<[TY; DN]>,

Source§

fn from(P4: P4<[TY; NU], AN, BN, CN, DN>) -> Self

Converts to this type from the input type.
Source§

impl<TY, A, B, C, D, const NU: usize, const AN: usize, const BN: usize, const CN: usize, const DN: usize> From<P4<[TY; NU], AN, BN, CN, DN>> for Le<(A, B, C, D)>
where TY: Copy + Default, Le<A>: From<[TY; AN]>, Le<B>: From<[TY; BN]>, Le<C>: From<[TY; CN]>, Le<D>: From<[TY; DN]>,

Source§

fn from(data: P4<[TY; NU], AN, BN, CN, DN>) -> Self

Converts to this type from the input type.
Source§

impl<TY, A, B, C, D, const NU: usize, const AN: usize, const BN: usize, const CN: usize, const DN: usize> From<P4<[TY; NU], AN, BN, CN, DN>> for Be<(A, B, C, D)>
where TY: Copy + Default, Be<A>: From<[TY; AN]>, Be<B>: From<[TY; BN]>, Be<C>: From<[TY; CN]>, Be<D>: From<[TY; DN]>,

Source§

fn from(data: P4<[TY; NU], AN, BN, CN, DN>) -> Self

Converts to this type from the input type.
Source§

impl<A, B, C, D, const NU: usize, const AN: usize, const BN: usize, const CN: usize, const DN: usize> FromBeBytes<NU> for P4<(A, B, C, D), AN, BN, CN, DN>
where A: FromBeBytes<AN>, B: FromBeBytes<BN>, C: FromBeBytes<CN>, D: FromBeBytes<DN>,

Source§

fn from_be_bytes(bytes: [u8; NU]) -> Self

Source§

impl<A, B, C, D, const NU: usize, const AN: usize, const BN: usize, const CN: usize, const DN: usize> FromLeBytes<NU> for P4<(A, B, C, D), AN, BN, CN, DN>
where A: FromLeBytes<AN>, B: FromLeBytes<BN>, C: FromLeBytes<CN>, D: FromLeBytes<DN>,

Source§

fn from_le_bytes(bytes: [u8; NU]) -> Self

Source§

impl<TY, A, B, C, D, const AN: usize, const BN: usize, const CN: usize, const DN: usize> FromLsb<P4<TY, AN, BN, CN, DN>> for (A, B, C, D)
where TY: Integral + AsPrimitive<A> + AsPrimitive<B> + AsPrimitive<C> + AsPrimitive<D>,

Source§

fn from_lsb(P4: P4<TY, AN, BN, CN, DN>) -> Self

Source§

impl<TY, A, B, C, D, const AN: usize, const BN: usize, const CN: usize, const DN: usize> FromMsb<P4<TY, AN, BN, CN, DN>> for (A, B, C, D)
where TY: Integral + AsPrimitive<A> + AsPrimitive<B> + AsPrimitive<C> + AsPrimitive<D>,

Source§

fn from_msb(P4: P4<TY, AN, BN, CN, DN>) -> Self

Source§

impl<TY: PartialEq, const A: usize, const B: usize, const C: usize, const D: usize> PartialEq for P4<TY, A, B, C, D>

Source§

fn eq(&self, other: &P4<TY, A, B, C, D>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<TY: PartialEq, const A: usize, const B: usize, const C: usize, const D: usize> StructuralPartialEq for P4<TY, A, B, C, D>

Source§

impl<'a, T, U, const AN: usize, const BN: usize, const CN: usize, const DN: usize> TryFrom<P4<&'a [T], AN, BN, CN, DN>> for Seq<U, &'a [T]>

Source§

type Error = TryFromSliceError

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

fn try_from(P4: P4<&'a [T], AN, BN, CN, DN>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<TY, const A: usize, const B: usize, const C: usize, const D: usize> Freeze for P4<TY, A, B, C, D>
where TY: Freeze,

§

impl<TY, const A: usize, const B: usize, const C: usize, const D: usize> RefUnwindSafe for P4<TY, A, B, C, D>
where TY: RefUnwindSafe,

§

impl<TY, const A: usize, const B: usize, const C: usize, const D: usize> Send for P4<TY, A, B, C, D>
where TY: Send,

§

impl<TY, const A: usize, const B: usize, const C: usize, const D: usize> Sync for P4<TY, A, B, C, D>
where TY: Sync,

§

impl<TY, const A: usize, const B: usize, const C: usize, const D: usize> Unpin for P4<TY, A, B, C, D>
where TY: Unpin,

§

impl<TY, const A: usize, const B: usize, const C: usize, const D: usize> UnsafeUnpin for P4<TY, A, B, C, D>
where TY: UnsafeUnpin,

§

impl<TY, const A: usize, const B: usize, const C: usize, const D: usize> UnwindSafe for P4<TY, A, B, C, D>
where TY: UnwindSafe,

Blanket Implementations§

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> AsPrimitive<()> for T

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> LsbInto<U> for T
where U: FromLsb<T>,

Source§

fn lsb_into(self) -> U

Source§

impl<T, U> MsbInto<U> for T
where U: FromMsb<T>,

Source§

fn msb_into(self) -> U

Source§

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

Source§

type Error = !

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, const N: usize> TryFromBeBytes<N> for T
where T: FromBeBytes<N>,

Source§

impl<T, const N: usize> TryFromLeBytes<N> for T
where T: FromLeBytes<N>,

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.