Enum CollabRequest
pub enum CollabRequest {
Show 36 variants
LocalFileClipboard {
request_id: u64,
command: Command,
on_behalf_of: Option<InvocationId>,
},
Hello {
app_id: String,
cluster_id: Uuid,
record: Option<String>,
record_kind: Option<String>,
handle: Option<String>,
},
Document {
mutation: DocumentMutation,
authorization: Option<DocumentAuthorization>,
},
RequestDocumentSnapshot,
OfferContent {
hash: String,
bytes: Vec<u8>,
},
WantContent {
hash: String,
},
Presence {
key: PresenceKey,
payload: PresencePayload,
},
SignedOperation {
envelope: Box<SignedOp>,
},
FetchScrollback {
artifact: ArtifactId,
before_seq: u64,
max: u16,
},
PublishActions {
app_id: String,
actions: Vec<ExportedAction>,
},
ReportContinuation {
app_id: String,
schema_version: u16,
metadata: Vec<u8>,
},
ClearContinuation {
app_id: String,
},
ReportHandoff {
app_id: String,
message: Vec<u8>,
},
ReportPlayback {
app_id: String,
reports_json: Vec<u8>,
},
NativeMediaCommand {
request_id: u64,
command: Request,
},
RealtimeCommand {
request_id: u64,
app_id: String,
command: RealtimeCommand,
},
NearbyTransferCommand {
request_id: u64,
app_id: String,
command: NearbyTransferCommand,
},
OpenWorkspaceControl {
session_id: u64,
target_device: [u8; 32],
},
WorkspaceControlInput {
session_id: u64,
event: WorkspaceControlInput,
},
CloseWorkspaceControl {
session_id: u64,
},
CompleteInvocation {
id: u64,
code: String,
message: String,
},
UpdateInvocation {
id: u64,
update: InvocationUpdate,
},
RecordLocalEffect {
address: ActionAddress,
update: InvocationUpdate,
},
RemoteAction {
message: RemoteActionMessage,
},
QueryActionDirectory {
request_id: u64,
query: ActionDirectoryQuery,
},
ResolvePublishedAction {
request_id: u64,
peer_id: u64,
revision: String,
resource: String,
action: String,
},
ManagedInvocationAttempt {
attempt: ManagedAttempt,
},
InvokeResolvedPublishedAction {
request_id: u64,
peer_id: u64,
revision: String,
resource: String,
action: String,
arguments: Map<String, Value>,
confirmation: Value,
},
InvokePublishedAction {
request_id: u64,
peer_id: u64,
resource: String,
action: String,
arguments: Map<String, Value>,
confirmation: Value,
},
PublishedInvocationStatus {
request_id: u64,
id: u64,
},
CancelPublishedInvocation {
request_id: u64,
id: u64,
},
LaunchPublishedApplication {
request_id: u64,
app_id: String,
content_hash: Option<String>,
},
LaunchInstalledApplication {
request_id: u64,
app_id: String,
package_root: Option<String>,
on_behalf_of: Option<InvocationId>,
},
ReportTaskRun {
request_id: Option<u64>,
run_id: u64,
lease: String,
update: TaskRunUpdate,
},
InvokeTaskAction {
request_id: u64,
invocation: InvocationId,
run_id: u64,
lease: String,
peer_id: u64,
provider: String,
resource: String,
action: String,
arguments: Map<String, Value>,
wait: Option<TaskChildWait>,
},
TaskRunCancellation {
request_id: u64,
run_id: u64,
lease: String,
},
}Variants§
LocalFileClipboard
Hello
Fields
record: Option<String>Which record (crate::record) this connection carries, when
adopted. The broker delivers payloads only to connections
announcing the same record, so two people editing different
files in one room don’t merge each other’s state; None means
one document per (app, room).
Document
A typed complete snapshot or incremental change set. The SDK wraps the
mutation in a signed envelope from the certified launcher identity.
Keeping the kind in DocumentMutation avoids parallel request and wire
enums drifting apart.
Fields
mutation: DocumentMutationHost-local original contributor custody; never serialized on the wire.
RequestDocumentSnapshot
Ask the broker to select one existing holder of this exact route as a snapshot responder. Safe to retry while no holder is available.
OfferContent
Content this route’s record references, which the app stored: the host keeps it where the record’s readers are served from.
WantContent
Content this route’s record references and the app lacks. Answered,
from this device or the route’s other devices, with
CollabEvent::RecordContent.
Presence
Outbound presence update — pointer moved, caret changed, selection
shifted, or arrived/left a keyed object. Fanned out to every
connected peer as CollabEvent::RemotePresenceUpdate.
SignedOperation
Signed incremental CRDT mutation. The broker validates against the channel’s role table before fanning out; invalid envelopes are dropped and logged, never reaching peers.
Boxed to keep the discriminant thin on the stack — SignedOp is
large (32-byte pubkey + 64-byte sig + payload + UUIDs).
FetchScrollback
Late-join scrollback fetch: up to max ops with seq < before_seq,
answered with one CollabEvent::ScrollbackBatch.
Apps page by repeating with before_seq set to the lowest seq from
the previous batch until exhausted == true, then fall back to the
cooperative path (broker queries gossip peers).
Fields
artifact: ArtifactIdPublishActions
Replace this application’s complete exported resource/action surface.
ReportContinuation
App-owned CRDT state projected for same-identity continuation. The local broker authenticates the route and stores this only for shell capture; it is never a room action or a restore command.
ClearContinuation
Remove the last continuation report after the app can no longer produce a safe projection.
ReportHandoff
Answer a handoff request, or report a retirement
(handoff::HandoffReport, encoded). Session-local, on the primary
route; never relayed to peers.
ReportPlayback
Private, level-triggered playback descriptors for shell-mediated same-person handoff. Never part of the room CRDT or peer fan-out.
NativeMediaCommand
One generic active-session continuity transition. The shell binds the command to this connection’s certified app/workspace route.
RealtimeCommand
NearbyTransferCommand
One Files-owned picker/status/consent command. The broker authenticates the app route and keeps payload bytes on the shell transfer transport.
OpenWorkspaceControl
WorkspaceControlInput
CloseWorkspaceControl
CompleteInvocation
Report the terminal result of a directed invocation.
UpdateInvocation
RecordLocalEffect
Terminal receipt for an Effect initiated by this app’s local UI.
RemoteAction
One remote-action request to the session’s action host: list the
actions offered to this connection, invoke one, observe or cancel an
invocation. The answer arrives as CollabEvent::RemoteAction.
Fields
message: RemoteActionMessageQueryActionDirectory
ResolvePublishedAction
ManagedInvocationAttempt
Opaque funded work from the owner-thread managed sender. Queue acceptance does not establish durable local acceptance or receiver admission.
Fields
attempt: ManagedAttemptInvokeResolvedPublishedAction
Fields
InvokePublishedAction
Fields
PublishedInvocationStatus
CancelPublishedInvocation
LaunchPublishedApplication
Fields
LaunchInstalledApplication
A Store launch, with a dedicated reply vocabulary so a widget’s correlation id cannot complete an unrelated SDK action invocation.
Fields
on_behalf_of: Option<InvocationId>ReportTaskRun
Lifecycle record for a broker-minted task lease. Only an admitted agent connection can make this request; the broker checks the lease.
InvokeTaskAction
Invoke an already permission-filtered published action under the
broker-owned task context. request_id correlates the async reply.
Fields
invocation: InvocationIdThe caller’s id for this invocation. A retry reuses it; the
broker reports the original, and Self::RemoteAction observes
or cancels it.
TaskRunCancellation
Poll the native Task Center’s cooperative cancellation bit for a lease. It cannot cancel a task and carries no task state itself.
Implementations§
§impl CollabRequest
impl CollabRequest
pub fn document_snapshot(data: Vec<u8>) -> CollabRequest
pub fn document_incremental(data: Vec<u8>) -> CollabRequest
Trait Implementations§
§impl Clone for CollabRequest
impl Clone for CollabRequest
§fn clone(&self) -> CollabRequest
fn clone(&self) -> CollabRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CollabRequest
impl !RefUnwindSafe for CollabRequest
impl Send for CollabRequest
impl Sync for CollabRequest
impl Unpin for CollabRequest
impl UnsafeUnpin for CollabRequest
impl !UnwindSafe for CollabRequest
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> 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