#[non_exhaustive]pub enum ServerMessage {
Show 54 variants
ComputerOpened {
request_id: String,
session_id: String,
},
DesktopStreamState {
request_id: String,
enabled: bool,
},
DesktopData {
data: Vec<u8>,
},
DesktopControlState {
request_id: Option<String>,
enabled: bool,
is_owner: bool,
session_id: Option<String>,
},
HookEvent {
event: HookEvent,
},
StorageUsage {
request_id: String,
usage: StorageUsage,
},
Telemetry {
request_id: String,
revision: u64,
sinks: Vec<TelemetrySinkReport>,
},
BrowserPageRequested {
request_id: String,
session_id: String,
foreground: bool,
},
DesktopControlRequested {
request_id: String,
execution_id: String,
session_id: String,
request: Value,
},
DesktopControlEnded {
execution_id: String,
},
Paired {
client_id: String,
token: String,
},
Authenticated,
Ready {
payload: ReadyPayload,
},
SessionOpened {
request_id: String,
payload: SessionReadyPayload,
},
SessionReplayComplete {
request_id: String,
session_id: String,
},
SessionHistory {
request_id: String,
session_id: String,
records: Vec<RecordedEvent>,
next_before_sequence: Option<u64>,
},
SessionChanged {
payload: SessionReadyPayload,
},
RealtimeVoiceStarted {
request_id: String,
session_id: String,
voice_id: String,
answer_sdp: String,
},
RealtimeVoiceFailed {
request_id: String,
session_id: String,
message: String,
},
RealtimeVoiceEnded {
session_id: String,
voice_id: String,
reason: Option<String>,
},
GatewayConfigured {
request_id: String,
payload: ReadyPayload,
},
Contributions {
request_id: String,
contributions: Vec<FrontendContribution>,
},
Accepted {
request_id: String,
},
SessionFileUploadReady {
request_id: String,
session_id: String,
upload_id: String,
max_chunk_bytes: usize,
},
SessionFileUploadChunkAccepted {
request_id: String,
session_id: String,
upload_id: String,
next_offset: u64,
},
SessionFileUploadCompleted {
request_id: String,
session_id: String,
file: SessionFileReference,
},
SessionFiles {
request_id: String,
session_id: String,
files: Vec<SessionFileRecord>,
},
SessionFileChunk {
request_id: String,
session_id: String,
file_id: String,
offset: u64,
data: Vec<u8>,
next_offset: Option<u64>,
},
Rejected {
request_id: String,
code: String,
message: String,
fatal: bool,
},
AgentEvent {
session_id: String,
record: RecordedEvent,
},
Sessions {
request_id: Option<String>,
sessions: Vec<SessionRecord>,
},
BackgroundApprovals {
approvals: Vec<BackgroundApproval>,
},
SessionsChanged {
sessions: Vec<SessionSlot>,
revision: String,
},
BotSessions {
request_id: String,
bot_id: String,
sessions: Vec<SessionRecord>,
},
Bots {
request_id: Option<String>,
bots: Vec<BotRecord>,
},
Clients {
request_id: String,
current_client_id: String,
clients: Vec<ClientStatus>,
},
ProviderCredentialCleared {
request_id: String,
instance: String,
},
ProviderCredentialSaved {
request_id: String,
instance: String,
provider: String,
},
PairingCode {
request_id: String,
code: String,
expires_at: i64,
},
ProviderLoginStarted {
request_id: String,
login_id: String,
provider: String,
verification_url: String,
user_code: String,
},
ProviderLoginFinished {
request_id: String,
login_id: String,
provider: String,
},
GitCredentialStatus {
request_id: String,
available: bool,
username: Option<String>,
},
SshIdentities {
request_id: String,
identities: Vec<SshIdentityRecord>,
},
SshIdentityGenerated {
request_id: String,
identity: SshIdentityRecord,
public_key: String,
},
Profile {
request_id: String,
profile: ProfileSnapshot,
},
GitDiff {
request_id: String,
session_id: String,
scope: GitDiffScope,
diff: String,
},
GitDiffTotals {
request_id: String,
session_id: String,
scope: GitDiffScope,
totals: DiffTotals,
},
Directories {
request_id: String,
listing: DirectoryListing,
},
WorkspaceFiles {
request_id: String,
session_id: String,
files: Vec<WorkspaceFileRecord>,
truncated: bool,
},
WorkspaceFileChunk {
request_id: String,
session_id: String,
path: String,
offset: u64,
data: Vec<u8>,
next_offset: Option<u64>,
},
Routines {
request_id: String,
routines: Vec<Routine>,
},
RoutineHistory {
request_id: String,
runs: Vec<RoutineRun>,
},
RoutineRunPreview {
request_id: String,
preview: RoutineRunPreview,
},
Error {
code: String,
message: String,
fatal: bool,
},
}Expand description
Results and broadcasts emitted by the gateway.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ComputerOpened
Acknowledges showing the gateway-owned computer.
Fields
DesktopStreamState
Acknowledges opening or closing this connection’s desktop stream.
DesktopData
Ordered RFB bytes from the gateway desktop.
Fields
data: Vec<u8>The raw RFB data, limited to MAX_DESKTOP_CHUNK_BYTES.
DesktopControlState
The gateway’s current desktop lease, relative to this connection.
Fields
HookEvent
A committed source changed; clients refresh their existing snapshots.
StorageUsage
Fresh measured storage usage.
Fields
usage: StorageUsageMeasured storage ownership and totals.
Telemetry
Collector configuration and delivery state.
Fields
sinks: Vec<TelemetrySinkReport>Configured collectors.
BrowserPageRequested
Requests the local renderer’s assigned page for one chat.
Fields
DesktopControlRequested
Selects the desktop control requested case.
Fields
DesktopControlEnded
Selects the desktop control ended case.
Paired
Selects the paired case.
Authenticated
Selects the authenticated case.
Ready
Selects the ready case.
Fields
payload: ReadyPayloadThe payload.
SessionOpened
Selects the session opened case.
SessionReplayComplete
Selects the session replay complete case.
SessionHistory
Selects the session history case.
Fields
records: Vec<RecordedEvent>The records.
SessionChanged
Selects the session changed case.
Fields
payload: SessionReadyPayloadThe payload.
RealtimeVoiceStarted
Selects the realtime voice started case.
Fields
RealtimeVoiceFailed
Selects the realtime voice failed case.
Fields
RealtimeVoiceEnded
Selects the realtime voice ended case.
Fields
GatewayConfigured
Selects the gateway configured case.
Contributions
Selects the contributions case.
Fields
contributions: Vec<FrontendContribution>The contributions.
Accepted
Selects the accepted case.
SessionFileUploadReady
Selects the session file upload ready case.
Fields
SessionFileUploadChunkAccepted
Selects the session file upload chunk accepted case.
Fields
SessionFileUploadCompleted
Selects the session file upload completed case.
Fields
file: SessionFileReferenceThe file.
SessionFiles
Selects the session files case.
Fields
files: Vec<SessionFileRecord>The files.
SessionFileChunk
Selects the session file chunk case.
Fields
Rejected
Selects the rejected case.
Fields
AgentEvent
Selects the agent event case.
Sessions
Selects the sessions case.
BackgroundApprovals
Selects the background approvals case.
Fields
approvals: Vec<BackgroundApproval>The approvals.
SessionsChanged
The whole visible session catalog, in order, relative to the catalog this connection last received; unsolicited catalog updates arrive only in this form.
Fields
sessions: Vec<SessionSlot>Every session of the catalog, unchanged ones by ID.
BotSessions
Selects the bot sessions case.
Fields
sessions: Vec<SessionRecord>The sessions.
Bots
Selects the bots case.
Clients
Selects the clients case.
Fields
clients: Vec<ClientStatus>The clients.
ProviderCredentialCleared
Selects the provider credential cleared case.
ProviderCredentialSaved
Selects the provider credential saved case.
Fields
PairingCode
Selects the pairing code case.
Fields
ProviderLoginStarted
Selects the provider login started case.
Fields
ProviderLoginFinished
Selects the provider login finished case.
Fields
GitCredentialStatus
Selects the git credential status case.
Fields
SshIdentities
Selects the ssh identities case.
SshIdentityGenerated
Selects the ssh identity generated case.
Fields
identity: SshIdentityRecordThe identity.
Profile
Selects the profile case.
GitDiff
Selects the git diff case.
Fields
scope: GitDiffScopeThe scope.
GitDiffTotals
Line totals of a Git diff.
Directories
Selects the directories case.
WorkspaceFiles
Selects the workspace files case.
Fields
files: Vec<WorkspaceFileRecord>The files.
WorkspaceFileChunk
Selects the workspace file chunk case.
Fields
Routines
Selects the routines case.
RoutineHistory
Selects the routine history case.
RoutineRunPreview
Selects the routine run preview case.
Error
Selects the error case.
Implementations§
Source§impl ServerMessage
impl ServerMessage
Sourcepub fn response_error(
&self,
request_id: Option<&str>,
) -> Option<GatewayResponseError<'_>>
pub fn response_error( &self, request_id: Option<&str>, ) -> Option<GatewayResponseError<'_>>
Returns the error which terminates a wait for request_id, if any.
A correlated rejection terminates that request. An uncorrelated global error only terminates a wait when it also terminates the connection.