pub struct DispatchContext {
pub focused_entity_id: Option<u64>,
pub selection: Vec<ResidueRef>,
pub designable: Vec<ResidueRef>,
}Expand description
Captured by the orchestrator at op-trigger time and frozen on the wire. Streams do NOT receive updated context mid-flight; only UpdateStream(params) can change values during a running stream.
Fields§
§focused_entity_id: Option<u64>The entity the user has focused in viso. Absent → no focus.
selection: Vec<ResidueRef>Selection state at trigger time. Each ResidueRef carries its own entity_id; selections can span multiple entities. Empty → no selection.
designable: Vec<ResidueRef>Residues the plugin may redesign (change identity at): the puzzle’s design mask. Orthogonal to selection, which says where to operate. Each ResidueRef carries its own entity_id. Empty → no design gating.
Implementations§
Source§impl DispatchContext
impl DispatchContext
Sourcepub fn focused_entity_id(&self) -> u64
pub fn focused_entity_id(&self) -> u64
Returns the value of focused_entity_id, or the default value if focused_entity_id is unset.
Trait Implementations§
Source§impl Clone for DispatchContext
impl Clone for DispatchContext
Source§fn clone(&self) -> DispatchContext
fn clone(&self) -> DispatchContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DispatchContext
impl Debug for DispatchContext
Source§impl Default for DispatchContext
impl Default for DispatchContext
Source§impl Message for DispatchContext
impl Message for DispatchContext
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for DispatchContext
impl PartialEq for DispatchContext
Source§fn eq(&self, other: &DispatchContext) -> bool
fn eq(&self, other: &DispatchContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DispatchContext
Auto Trait Implementations§
impl Freeze for DispatchContext
impl RefUnwindSafe for DispatchContext
impl Send for DispatchContext
impl Sync for DispatchContext
impl Unpin for DispatchContext
impl UnsafeUnpin for DispatchContext
impl UnwindSafe for DispatchContext
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
Mutably borrows from an owned value. Read more