#[repr(u32)]pub enum Boundaries {
Fuse = 0,
Preserve = 1,
Seal = 2,
Split = 3,
}Expand description
What a stage does to the message boundaries passing through it.
Read once, after tocat_init, out of the low two bits of
tocat_boundaries. The host folds these along the chain to answer one
question per requiring stage: do that stage’s units survive as far as they
have to. Nothing here is consulted on the per-chunk path.
Fuse is the default and the safe answer, because it claims
nothing: a stage that has not thought about boundaries cannot be relied on
to keep them.
Variants§
Implementations§
Source§impl Boundaries
impl Boundaries
pub const fn from_u32(value: u32) -> Option<Boundaries>
pub const fn as_u32(self) -> u32
Sourcepub const fn preserves_messages(self) -> bool
pub const fn preserves_messages(self) -> bool
Sourcepub const fn passes_downstream(self) -> bool
pub const fn passes_downstream(self) -> bool
Whether a requirement scanning downwards passes this stage without being settled either way.
Only Preserve does. Seal settles it
in favour, the other two against, which is why the scan stops at all
three and asks satisfies_downstream
which it was.
Sourcepub const fn passes_upstream(self) -> bool
pub const fn passes_upstream(self) -> bool
Whether a requirement scanning upwards passes this stage without being settled either way.
Seal does, because it emits one unit for every unit it
was given; sealing only settles a scan going the other way.
Sourcepub const fn satisfies_downstream(self) -> bool
pub const fn satisfies_downstream(self) -> bool
Whether a downstream requirement that reached this stage is met by it, so that nothing below can invalidate it.
Sourcepub const fn satisfies_upstream(self) -> bool
pub const fn satisfies_upstream(self) -> bool
Whether an upstream requirement that reached this stage is met by it.
Trait Implementations§
Source§impl Clone for Boundaries
impl Clone for Boundaries
Source§fn clone(&self) -> Boundaries
fn clone(&self) -> Boundaries
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more