pub struct SemanticInteraction {
pub version: u16,
pub invocation: InvocationId,
pub sequence: u64,
pub actor: Acting,
pub phase: InteractionPhase,
pub action: InteractionAction,
pub resource: ActionResource,
pub anchor: InteractionAnchor,
pub group: Option<WorkGroup>,
}Expand description
One broker-normalized, transient semantic interaction event.
sequence is monotonic within an invocation. The broker owns the actor,
sequence and legal lifecycle transitions; an application contributes only
the target it can resolve from the freshly encoded action and live model.
Fields§
§version: u16§invocation: InvocationId§sequence: u64§actor: Acting§phase: InteractionPhase§action: InteractionAction§resource: ActionResource§anchor: InteractionAnchor§group: Option<WorkGroup>Implementations§
Source§impl SemanticInteraction
impl SemanticInteraction
Sourcepub fn written_in(
&self,
region: Option<&str>,
block: &str,
text: &str,
) -> Option<(usize, usize)>
pub fn written_in( &self, region: Option<&str>, block: &str, text: &str, ) -> Option<(usize, usize)>
The characters it writes into the text text of block block (in region, when one is
named), as byte offsets in it: the Text range its anchor names there, counted in
characters because a place counts them that way.
Sourcepub fn normalized_by_broker(self, actor: Acting, sequence: u64) -> Self
pub fn normalized_by_broker(self, actor: Acting, sequence: u64) -> Self
Replace attribution with the identity authenticated by the broker.
actor in decoded application/agent input is an untrusted claim. A
broker must call this (and assign its own monotonic sequence) before
validating or broadcasting the normalized event. Presence consumers
may trust attribution only on broker-originated streams.
Sourcepub fn validate(&self) -> Result<(), InteractionViolation>
pub fn validate(&self) -> Result<(), InteractionViolation>
Validate size and semantic bounds before accepting an untrusted update.
Unknown additive object fields remain serde-compatible; a semantic
change uses a new version and is rejected here by older readers.
Trait Implementations§
Source§impl Clone for SemanticInteraction
impl Clone for SemanticInteraction
Source§impl Debug for SemanticInteraction
impl Debug for SemanticInteraction
Source§impl<'de> Deserialize<'de> for SemanticInteraction
impl<'de> Deserialize<'de> for SemanticInteraction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SemanticInteraction
Source§impl PartialEq for SemanticInteraction
impl PartialEq for SemanticInteraction
Source§impl Serialize for SemanticInteraction
impl Serialize for SemanticInteraction
impl StructuralPartialEq for SemanticInteraction
Auto Trait Implementations§
impl Forget for SemanticInteraction
impl Freeze for SemanticInteraction
impl Move for SemanticInteraction
impl RefUnwindSafe for SemanticInteraction
impl Send for SemanticInteraction
impl Sync for SemanticInteraction
impl Unpin for SemanticInteraction
impl UnsafeUnpin for SemanticInteraction
impl UnwindSafe for SemanticInteraction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more