Skip to main content

LogicalSignal

Struct LogicalSignal 

Source
pub struct LogicalSignal {
    pub signal_id: SignalId,
    pub source: Option<SignalSourceKind>,
    pub target: SignalTarget,
    pub urgency: Option<SignalUrgency>,
    pub payload: BoundedJson,
    pub source_timestamp_ms: Option<WireU64>,
    pub dedupe_key: Option<String>,
    pub escalate_after_ms: Option<WireU64>,
}

Fields§

§signal_id: SignalId§source: Option<SignalSourceKind>§target: SignalTarget§urgency: Option<SignalUrgency>§payload: BoundedJson§source_timestamp_ms: Option<WireU64>

Metadata only. TTL, deadlines and admission all use the envelope’s accepted time.

§dedupe_key: Option<String>§escalate_after_ms: Option<WireU64>

How long this signal may wait before its urgency is raised one tier — a duration, not an instant.

A duration is the only shape that can be a canonical input. The deadline it implies is anchored to the envelope’s accepted time, which the kernel already owns, so a redelivery of the same bytes anchors identically; an absolute deadline_ms would be a second host clock on the wire (DEC-2, §11.2) and would make the same intent decode to a different deadline on every retry.

Inert unless signal_policy.deadline_escalation is on — that switch is the operation’s statement that it wants waiting to change priority at all. Some(0) is a legitimate value: escalate on admission.

Implementations§

Source§

impl LogicalSignal

Source

pub fn new(signal_id: SignalId) -> Self

Source

pub fn effective_urgency(&self, escalation_enabled: bool) -> SignalUrgency

The urgency this delivery reaches at admission, once a due escalate_after_ms is applied.

The kernel has to know this before the router moves: the one effect a delivery can publish is PreemptTasks, and DEC-8 says an undeclared effect is refused with nothing mutated. Reading the wire urgency alone would let an escalated-to-critical signal reach the router and only then discover the host cannot stop its children.

Trait Implementations§

Source§

impl Clone for LogicalSignal

Source§

fn clone(&self) -> LogicalSignal

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 Debug for LogicalSignal

Source§

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

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

impl<'de> Deserialize<'de> for LogicalSignal

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for LogicalSignal

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for LogicalSignal

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for LogicalSignal

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.