[][src]Module crosis::protocol

This is the underlying protocol which Crosis uses to interface with Replit's containers.

Protocol is the protobuf-based interface which defines how data is sent and received from a Replit container. All data that is exchanged uses the same Command structure; instead, the body of the Command is what changes to fit the necessary sent/received data structure.

Example

// get protocol from crosis
use crosis::protocol;
 
// create a command
let command = protocol::Command {
  // channel and session act as namespaces (0 being global)
  channel: 0,
  session: 0,
  // can be used to identify a response message/event ("" being no ref)
  r#ref: String::new(),
  // the command you want to send (example command)
  body: Some(protocol::command::Body::Ping(protocol::Ping {}))
};
 
// do stuff with command

Notes

If you want to use the Protocol by itself - without the higher-level Crosis API - you can use default-features = false in Cargo.toml.

This implementaion uses prost for encoding and decoding protobuf data.

Modules

boot_status
close_channel
close_channel_res
command
container_state
file
file_event
open_channel
open_channel_res
ot_rune_transform_op
pprof_request
vcr_entry

Structs

AppendMeta
Audio
Audio2
Auth
BootStatus
ChatMessage
ChatScrollback
ChatTyping
CheckChanges
Clear
CloseChannel
CloseChannelRes
Command
Connect
ContainedTest
ContainerState
Debug
DebugStatus
Disconnect
EnsurePackages
Exec
ExecInfo
File
FileAuthReq
FileAuthRes
FileEvent
Files
Flush
FsLock
FsSnapshot
Goodbye
Hello
Hint
LintResult
LintResults
ListObjects
ListObjectsResp
Metrics
Move
MultiFileAuthRes
Ok
OpenChannel
OpenChannelRes
OtCursor
OtFetchRequest
OtFetchResponse
OtLinkFile
OtPacket
OtRuneTransformOp
OtStatus
Package
PackageAdd
PackageCacheSave
PackageInfo
PackageInfoResp
PackageInstall
PackageListSpecfile
PackageListSpecfileResp
PackageRemove
PackageSearch
PackageSearchResp
Pid1Config
Ping
Pong
PortOpen
PprofAllocsProfileRequest
PprofBlockProfileRequest
PprofCpuProfileRequest
PprofHeapProfileRequest
PprofMutexProfileRequest
PprofRequest
PprofResponse
ReadMeta
ReadVcr
Recv
ResizeTerm
Roster
RunMain
SaneTerm
Send
StackFrame
Start
StartVcr
SubscribeFile
TestFailure
TestResult
Toast
User
VcrEntry
VcrLog
WriteMeta

Enums

FileAuthMethod
State