Type Alias hazardflow_designs::std::valid::Valid
source · pub type Valid<P> = I<ValidH<P, ()>, { Dep::Helpful }>;
Expand description
Valid interface.
A transfer always happens for a valid payload.
Interface::Fwd
=HOption<P>
Interface::Bwd
=()
Aliased Type§
struct Valid<P> { /* private fields */ }
Implementations§
source§impl<P: Copy, const N: usize> Valid<(P, BoundedU<N>)>
impl<P: Copy, const N: usize> Valid<(P, BoundedU<N>)>
sourcepub fn branch(self) -> [Valid<P>; N]
pub fn branch(self) -> [Valid<P>; N]
A variation of branch
for a valid interface, that has the correct resolver type.
- Payload: Only the selected interface’s payload will be valid.
- Resolvers: The resolvers carry no information.
Interface | Ingress | Egress |
---|---|---|
Fwd | HOption<P> | Array<HOption<P>, N> |
Bwd | () | Array<(), N> |
source§impl<P1: Copy, P2: Copy> Valid<(P1, P2)>
impl<P1: Copy, P2: Copy> Valid<(P1, P2)>
sourcepub fn unzip(self) -> (Valid<P1>, Valid<P2>)
pub fn unzip(self) -> (Valid<P1>, Valid<P2>)
A variation of unzip
for a valid interface, that has the correct resolver type.
- Payload: Unzipped to multiple interfaces.
- Resolvers: The resolvers carry no information.
Interface | Ingress | Egress |
---|---|---|
Fwd | HOption<(P1, P2)> | (HOption<P1>, HOption<P2>) |
Bwd | () | ((), ()) |