#[non_exhaustive]pub enum ServerMessage {
Show 36 variants
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,
},
GatewayConfigured {
request_id: String,
payload: ReadyPayload,
},
GlobalScratchpadChanged {
request_id: String,
contribution: 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>,
},
Swarms {
request_id: Option<String>,
swarms: Vec<SwarmRecord>,
},
Clients {
request_id: String,
current_client_id: String,
clients: Vec<ClientStatus>,
},
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,
},
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>,
},
CronTasks {
request_id: String,
tasks: Vec<CronTask>,
},
CronHistory {
request_id: String,
runs: Vec<CronRun>,
},
CronRunPreview {
request_id: String,
preview: CronRunPreview,
},
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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Paired
Authenticated
Ready
Fields
§
payload: ReadyPayloadSessionOpened
SessionReplayComplete
SessionHistory
Fields
§
records: Vec<RecordedEvent>SessionChanged
Fields
§
payload: SessionReadyPayloadGatewayConfigured
GlobalScratchpadChanged
Accepted
SessionFileUploadReady
SessionFileUploadChunkAccepted
SessionFileUploadCompleted
SessionFiles
SessionFileChunk
Fields
Rejected
AgentEvent
Sessions
Swarms
Clients
ProviderCredentialSaved
PairingCode
ProviderLoginStarted
Fields
ProviderLoginFinished
GitCredentialStatus
SshIdentities
SshIdentityGenerated
Profile
GitDiff
Directories
WorkspaceFiles
WorkspaceFileChunk
Fields
CronTasks
CronHistory
CronRunPreview
Error
Trait Implementations§
Source§impl Clone for ServerMessage
impl Clone for ServerMessage
Source§fn clone(&self) -> ServerMessage
fn clone(&self) -> ServerMessage
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 ServerMessage
impl Debug for ServerMessage
Source§impl<'de> Deserialize<'de> for ServerMessage
impl<'de> Deserialize<'de> for ServerMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ServerMessage
impl PartialEq for ServerMessage
Source§impl Serialize for ServerMessage
impl Serialize for ServerMessage
impl StructuralPartialEq for ServerMessage
Auto Trait Implementations§
impl Freeze for ServerMessage
impl RefUnwindSafe for ServerMessage
impl Send for ServerMessage
impl Sync for ServerMessage
impl Unpin for ServerMessage
impl UnsafeUnpin for ServerMessage
impl UnwindSafe for ServerMessage
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