pub enum DeclaredSubscriptionShape {
BufferedRaw,
BufferedRawSafety,
BufferedRawInfo,
}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_and_rx_hint →
Executor::register_subscription_buffered_raw_on.
BufferedRawSafety
A .safety() declaration:
Node::create_generic_subscription_with_integrity_and_rx_hint →
Executor::register_subscription_buffered_raw_safety_on.
BufferedRawInfo
A declaration that asked for the message’s metadata:
Node::create_generic_subscription_with_info_and_rx_hint →
Executor::register_subscription_buffered_raw_msg_info_on, the path
C++’s (msg, MessageInfo) callback takes too.
Implementations§
Source§impl DeclaredSubscriptionShape
impl DeclaredSubscriptionShape
Sourcepub const fn of_declaration(safety: bool, message_info: bool) -> Self
pub const fn of_declaration(safety: bool, message_info: bool) -> Self
Classify a declaration.
message_info is the declaration’s request for the message’s
metadata (CallbackCtx::message_info). A declaration states at most
one of the two: each has its own declaration call, and neither call
sets the other’s flag. If both were set, safety wins, because a
validated sample must not reach a callback unvalidated.
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. 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.BufferedRawInfo—false. Its metadata comes with a COPYING take (take_serialized_with_info);process_raw_in_placehands over borrowed payload bytes and nothing else. This is the price of asking for the metadata, and why asking is opt-in.
Sourcepub const fn claims_closure_buffer(self) -> bool
pub const fn claims_closure_buffer(self) -> bool
Does a registration of this shape claim the closure buffer (RX_BUF)
when it does NOT dispatch in place, rather than a bound the call site
stated?
Both entry points are type-erased and write
slot_bytes: RX_BUF into their SubscriptionRequest, which is what
registration_observer reports as claims_closure_buffer. The Rust
probe declares without registering, so it states this from the shape —
beside in_place_capable, because a row that
carries one of the two facts and not the other was priced by a backend
default: a scaffolded Cyclone listener got the 12-byte bound of its type
and died at boot short of RX_BUF.
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