Struct SemanticInteraction
pub struct SemanticInteraction {
pub version: u16,
pub invocation: InvocationId,
pub sequence: u64,
pub actor: InteractionActor,
pub phase: InteractionPhase,
pub action: InteractionAction,
pub resource: ActionResource,
pub anchor: InteractionAnchor,
pub group: Option<ActionGroup>,
}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: InteractionActor§phase: InteractionPhase§action: InteractionAction§resource: ActionResource§anchor: InteractionAnchor§group: Option<ActionGroup>Implementations§
§impl SemanticInteraction
impl SemanticInteraction
pub fn normalized_by_broker(
self,
actor: InteractionActor,
sequence: u64,
) -> SemanticInteraction
pub fn normalized_by_broker( self, actor: InteractionActor, sequence: u64, ) -> SemanticInteraction
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.
pub 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.
§Errors
Returns the first bounded-field, range, version, or encoded-size violation found in the update.
Trait Implementations§
§impl Clone for SemanticInteraction
impl Clone for SemanticInteraction
§fn clone(&self) -> SemanticInteraction
fn clone(&self) -> SemanticInteraction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SemanticInteraction
impl Debug for SemanticInteraction
§impl<'de> Deserialize<'de> for SemanticInteraction
impl<'de> Deserialize<'de> for SemanticInteraction
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SemanticInteraction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SemanticInteraction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for SemanticInteraction
impl PartialEq for SemanticInteraction
§fn eq(&self, other: &SemanticInteraction) -> bool
fn eq(&self, other: &SemanticInteraction) -> bool
self and other values to be equal, and is used by ==.§impl Serialize for SemanticInteraction
impl Serialize for SemanticInteraction
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for SemanticInteraction
impl StructuralPartialEq for SemanticInteraction
Auto Trait Implementations§
impl Freeze 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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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