pub enum DeclaredSubscriptionShape {
BufferedRaw,
BufferedRawSafety,
}Expand description
Which of the executor’s registration entry points a DECLARED subscription lowers to.
One variant per lowering the declarative registrar can choose. Exhaustive:
a new lowering is a new variant, which breaks
in_place_capable at compile time and the
registrar at its gate.
Variants§
BufferedRaw
Node::create_generic_subscription_with_qos →
Executor::register_subscription_buffered_raw_on.
BufferedRawSafety
A .safety() declaration:
Node::create_generic_subscription_with_integrity →
Executor::register_subscription_buffered_raw_safety_on.
Implementations§
Source§impl DeclaredSubscriptionShape
impl DeclaredSubscriptionShape
Sourcepub const fn of_declaration(safety: bool) -> Self
pub const fn of_declaration(safety: bool) -> Self
Classify a declaration.
safety is the declaration’s .safety() flag as the runtime will
see it: a build whose safety-e2e capability is off ignores the flag
and registers the basic path, so its caller masks the flag to false
before asking. That mask has exactly one home on the caller’s side, for
the same reason this classifier has one here.
Sourcepub const fn in_place_capable(self) -> bool
pub const fn in_place_capable(self) -> bool
Can a registration of this shape dispatch out of the backend’s own receive slot?
The definition, not a copy of one. Each entry point writes this
call into its SubscriptionRequest, so the answer a probe states and
the answer the executor acts on are the same expression.
The two shapes differ, and the reason each has its answer is worth a sentence:
BufferedRaw—true(issue 1340). Its callback isFnMut(&[u8]), borrowed bytes and nothing else, which is exactly whatprocess_raw_in_placehands over. It wasfalsewhile its arena entry was believed shared withadd_arena_subscription_callback; that caller never reachesopen_subscription, so the in-place arm could be local to the one entry point. A true here is a claim the build PRICES: the probe statesin_placefor every declared non-safety subscription, and on an in-place backend that endpoint reserves no receive region.BufferedRawSafety—false.process_raw_in_placehas no validating form: an integrity-checked sample must be verified before the callback sees it, and the borrowed slot offers nowhere to put the verdict. Not a limit anyone plans to lift by flipping this.
Trait Implementations§
Source§impl Clone for DeclaredSubscriptionShape
impl Clone for DeclaredSubscriptionShape
Source§fn clone(&self) -> DeclaredSubscriptionShape
fn clone(&self) -> DeclaredSubscriptionShape
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more