Enum RemoteActionMessage
pub enum RemoteActionMessage {
FeedbackRequest {
correlation: u64,
query: FeedbackQuery,
},
FeedbackResponse {
correlation: u64,
result: Result<FeedbackAnswer, ActionHostError>,
},
CatalogueRequest {
correlation: u64,
query: CatalogueQuery,
},
CatalogueResponse {
correlation: u64,
result: Result<CataloguePage, ActionHostError>,
},
Invoke(InvokeRequest),
Receipt(InvocationReceipt),
Observe {
invocation: InvocationId,
wait_ms: Option<u32>,
seen: Option<UpdateMark>,
},
Update {
invocation: InvocationId,
state: Option<InvocationState>,
},
Cancel {
invocation: InvocationId,
},
CancelResponse {
invocation: InvocationId,
result: Result<(), ActionHostError>,
},
RecordRequest {
correlation: u64,
query: RecordQuery,
},
RecordResponse {
correlation: u64,
result: Result<RecordPiece, ActionHostError>,
},
}Expand description
Everything that crosses the wire for remote action use.
Variants§
FeedbackRequest
Inspect existing feedback admission or read an existing canonical ack. This never invokes a document mutation or grants room access.
FeedbackResponse
CatalogueRequest
Ask for one page of the actions offered to the caller.
CatalogueResponse
Answer to a Self::CatalogueRequest with the same correlation.
Invoke(InvokeRequest)
Run one action.
Receipt(InvocationReceipt)
Answer to Self::Invoke; a refusal is ReceiptStatus::Rejected.
Observe
Ask for an invocation’s latest state.
Fields
invocation: InvocationIdwait_ms: Option<u32>Hold the answer until the invocation moves past seen (or, with
no seen, settles) or this many milliseconds pass, at most
MAX_REMOTE_WAIT; then answer with the state as it is. A host
that predates it answers at once, as before.
seen: Option<UpdateMark>How far the caller has already seen the invocation get.
Update
Answer to Self::Observe; None for an id the caller does not own.
A host may also push this unprompted as an invocation progresses.
Cancel
Ask a running invocation to stop.
Fields
invocation: InvocationIdCancelResponse
Answer to Self::Cancel.
RecordRequest
Ask a device for a room record it holds, from query.offset on.
The same authenticated device-to-device route as an action, but
answered by the device from what its app last made durable, not by
an action host: a record is readable where it is kept whether or not
its app is running.
RecordResponse
Answer to Self::RecordRequest with the same correlation: the next
piece of the record, or why it is not given.
Implementations§
§impl RemoteActionMessage
impl RemoteActionMessage
pub const fn observe(invocation: InvocationId) -> RemoteActionMessage
pub const fn observe(invocation: InvocationId) -> RemoteActionMessage
Ask for invocation’s state as it is now.
pub const fn waits(&self) -> bool
pub const fn waits(&self) -> bool
Whether this request asks its host to hold the answer until the invocation moves, so whatever carries it must not wait behind it.
pub const fn is_request(&self) -> bool
pub const fn is_request(&self) -> bool
Whether a host answers this message (as opposed to a caller receiving it).
Trait Implementations§
§impl Clone for RemoteActionMessage
impl Clone for RemoteActionMessage
§fn clone(&self) -> RemoteActionMessage
fn clone(&self) -> RemoteActionMessage
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 RemoteActionMessage
impl Debug for RemoteActionMessage
§impl<'de> Deserialize<'de> for RemoteActionMessage
impl<'de> Deserialize<'de> for RemoteActionMessage
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RemoteActionMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RemoteActionMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for RemoteActionMessage
impl PartialEq for RemoteActionMessage
§fn eq(&self, other: &RemoteActionMessage) -> bool
fn eq(&self, other: &RemoteActionMessage) -> bool
self and other values to be equal, and is used by ==.§impl Serialize for RemoteActionMessage
impl Serialize for RemoteActionMessage
§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 StructuralPartialEq for RemoteActionMessage
Auto Trait Implementations§
impl Freeze for RemoteActionMessage
impl RefUnwindSafe for RemoteActionMessage
impl Send for RemoteActionMessage
impl Sync for RemoteActionMessage
impl Unpin for RemoteActionMessage
impl UnsafeUnpin for RemoteActionMessage
impl UnwindSafe for RemoteActionMessage
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<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