Enum CollabRequest
pub enum CollabRequest {
Show 33 variants
ExternalModeration {
command: Request,
on_behalf_of: InvocationId,
reply: ExternalModerationReply,
},
SelectedDiscovery {
request_id: u64,
command: Request,
on_behalf_of: Option<InvocationId>,
},
OpenSelectedV2 {
request_id: u64,
command: Request,
on_behalf_of: InvocationId,
},
OpenSelected {
request_id: u64,
command: Request,
on_behalf_of: InvocationId,
},
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<Arc<dyn DocumentCustody>>,
commit: Option<WorkspaceCommit>,
},
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 {
actions: Vec<ExportedAction>,
},
PublishActionSurface {
delta: SurfaceDelta,
},
ReportContinuation {
schema_version: u16,
metadata: Vec<u8>,
},
ClearContinuation,
ReportHandoff {
message: Vec<u8>,
},
PublishSearchIndex {
delta_json: Vec<u8>,
},
NativeMediaCommand {
request_id: u64,
command: Request,
},
RealtimeCommand {
request_id: u64,
command: RealtimeCommand,
},
NearbyTransferCommand {
request_id: u64,
command: NearbyTransferCommand,
},
OpenWorkspaceControl {
session_id: u64,
target_device: [u8; 32],
},
WorkspaceControlInput {
session_id: u64,
event: WorkspaceControlInput,
},
CloseWorkspaceControl {
session_id: u64,
},
UpdateInvocation {
id: u64,
update: InvocationUpdate,
},
ReportLocalDocumentAction {
request_id: u64,
report: LocalDocumentActionReport,
},
RecordLocalEffect {
address: ActionAddress,
update: InvocationUpdate,
},
RemoteAction {
message: RemoteActionMessage,
},
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§
ExternalModeration
SelectedDiscovery
OpenSelectedV2
OpenSelected
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 workspace don’t merge each other’s state; None means
one document per (app, workspace).
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.
commit: Option<WorkspaceCommit>The action this mutation is one part of, when the caller made it
as part of an action that writes more than one unit: every part
carries the same commit, and a peer applies them all together or
not at all. None publishes a commit for this unit alone.
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 (the broker asks the workspace’s other members).
Fields
artifact: ArtifactIdPublishActions
Replace this application’s complete exported resource/action surface,
whole. For small surfaces a caller builds directly; the toolkit’s own
publication sends Self::PublishActionSurface.
Fields
actions: Vec<ExportedAction>PublishActionSurface
Change this application’s exported resource/action surface: the
delta from what the broker holds (or, when it resets, a whole new
surface). See SurfacePublication.
Fields
delta: SurfaceDeltaReportContinuation
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 workspace 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.
PublishSearchIndex
A change to this app’s entries in the system’s persistent search
index ([crate::search::index_publication::IndexDelta], encoded).
Bound to the certified primary route; never relayed to peers.
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
UpdateInvocation
ReportLocalDocumentAction
Private speculative document report on the existing authenticated route. Capture must retain the revision of its actual published directory; this request never resolves a newer revision or grants document authorization.
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: RemoteActionMessageLaunchInstalledApplication
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
pub fn document_action(
mutation: DocumentMutation,
commit: WorkspaceCommit,
) -> CollabRequest
pub fn document_action( mutation: DocumentMutation, commit: WorkspaceCommit, ) -> CollabRequest
One part of the action commit names: the changes this unit made,
carrying the action across every unit it wrote, so a peer applies all
of it or none. The commit’s device is stamped by the transport that
signs the frame.
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> 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>, which can then be
downcast into Box<dyn 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>, which 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> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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