Skip to main content

DeclaredSubscriptionShape

Enum DeclaredSubscriptionShape 

Source
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

Source

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.

Source

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 is FnMut(&[u8]), borrowed bytes and nothing else, which is exactly what process_raw_in_place hands over. It was false while its arena entry was believed shared with add_arena_subscription_callback; that caller never reaches open_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 states in_place for every declared non-safety subscription, and on an in-place backend that endpoint reserves no receive region.
  • BufferedRawSafety — false. process_raw_in_place has 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

Source§

fn clone(&self) -> DeclaredSubscriptionShape

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DeclaredSubscriptionShape

Source§

impl Debug for DeclaredSubscriptionShape

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DeclaredSubscriptionShape

Source§

impl PartialEq for DeclaredSubscriptionShape

Source§

fn eq(&self, other: &DeclaredSubscriptionShape) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DeclaredSubscriptionShape

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.