Trait hazardflow_designs::std::combinators::zip_any::ZipAnyExt
source · pub trait ZipAnyExt: Interface {
type E: Interface;
// Required method
fn zip_any(self) -> Self::E;
}
Expand description
Extension trait for zip_any
.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<H1: Hazard, H2: Hazard, H3: Hazard, const D: Dep> ZipAnyExt for (I<H1, D>, I<H2, D>, I<H3, D>)
impl<H1: Hazard, H2: Hazard, H3: Hazard, const D: Dep> ZipAnyExt for (I<H1, D>, I<H2, D>, I<H3, D>)
source§impl<H1: Hazard, H2: Hazard, const D: Dep> ZipAnyExt for (I<H1, D>, I<H2, D>)
impl<H1: Hazard, H2: Hazard, const D: Dep> ZipAnyExt for (I<H1, D>, I<H2, D>)
source§fn zip_any(self) -> I<ZipAnyH<H1, H2>, D>
fn zip_any(self) -> I<ZipAnyH<H1, H2>, D>
Zips any of the two hazard interfaces.
Ingress transfers and an egress transfer happen as soon as any of the ingress transfer conditions are satisfied. Note that the ingress transfers happen only for the interfaces whose transfer condition is satisfied.
To achieve this, the egress interface’s hazard is ZipAnyH
with ready condition “any of the ingress interfaces’
transfer conditions are true”.
- Payloads: Wrapped in another
HOption
. The outerHOption
isSome
if any of the payloads areSome
. - Resolver: Preserved.
Interface | Ingress | Egress |
---|---|---|
Fwd | (HOption<H1::P>, HOption<H2::P>) | HOption<(HOption<H1::P>, HOption<H2::P>)> |
Bwd | (H1::R, H2::R) | (H1::R, H2::R) |