[][src]Enum replit_protocol::command::Body

pub enum Body {
    OpenChan(OpenChannel),
    OpenChanRes(OpenChannelRes),
    CloseChan(CloseChannel),
    CloseChanRes(CloseChannelRes),
    ContainerState(ContainerState),
    PortOpen(PortOpen),
    Toast(Toast),
    Redirect(Redirect),
    RunMain(RunMain),
    Clear(Clear),
    Eval(String),
    Result(String),
    Input(String),
    Output(String),
    Error(String),
    SaneTerm(SaneTerm),
    ResizeTerm(ResizeTerm),
    State(i32),
    Ok(Ok),
    Persist(File),
    PersistMirror(File),
    Write(File),
    Remove(File),
    Move(Move),
    TryRemove(File),
    Mkdir(File),
    Read(File),
    Readdir(File),
    Files(Files),
    File(File),
    CheckChanges(CheckChanges),
    ChangedFiles(Files),
    LintResults(LintResults),
    RunContainedTest(ContainedTest),
    TestResult(TestResult),
    DebuggerStart(String),
    DebuggerStep(RunMain),
    DebuggerStatus(DebugStatus),
    EnsurePackages(EnsurePackages),
    Ping(Ping),
    Pong(Pong),
    Hello(Hello),
    Goodbye(Goodbye),
    Hint(Hint),
    Connect(Connect),
    Send(Send),
    Recv(Recv),
    Disconnect(Disconnect),
    FileAuthReq(FileAuthReq),
    FileAuthRes(FileAuthRes),
    MutliFileAuthRes(MultiFileAuthRes),
    ListObjects(ListObjects),
    ListObjectsResp(ListObjectsResp),
    Ot(OtPacket),
    Otstatus(OtStatus),
    OtLinkFile(OtLinkFile),
    OtNewCursor(OtCursor),
    OtDeleteCursor(OtCursor),
    OtFetchRequest(OtFetchRequest),
    OtFetchResponse(OtFetchResponse),
    Flush(Flush),
    Debug(Debug),
    StartVcr(StartVcr),
    ReadVcr(ReadVcr),
    VcrLog(VcrLog),
    Auth(Auth),
    ExecInfo(ExecInfo),
    SubscribeFile(SubscribeFile),
    FileEvent(FileEvent),
    Roster(Roster),
    Join(User),
    Part(User),
    Exec(Exec),
    PackageSearch(PackageSearch),
    PackageSearchResp(PackageSearchResp),
    PackageInfo(PackageInfo),
    PackageInfoResp(PackageInfoResp),
    PackageAdd(PackageAdd),
    PackageRemove(PackageRemove),
    PackageInstall(PackageInstall),
    PackageListSpecfile(PackageListSpecfile),
    PackageListSpecfileResp(PackageListSpecfileResp),
    PackageCacheSave(PackageCacheSave),
    ChatMessage(ChatMessage),
    ChatTyping(ChatTyping),
    ChatScrollback(ChatScrollback),
    FsSnapshot(FsSnapshot),
    FsTakeLock(FsLock),
    FsReleaseLock(FsLock),
    HasCap(bool),
    Pid1Config(Pid1Config),
    Metrics(Metrics),
    BootStatus(BootStatus),
    ReadMeta(ReadMeta),
    WriteMeta(WriteMeta),
    AppendMeta(AppendMeta),
    Audio(Audio),
    PprofRequest(PprofRequest),
    PprofResponse(PprofResponse),
    Audio2(Audio2),
    PtyConfig(PtyConfig),
}

Used to store the actual data for a specific command which is being sent or received.

If an unexpected command is sent to the container there is a multitude of things that may happen. An unexpected command sent from the global channel (with id 0) is likely to kill the container.

global messages

Variants

OpenChan(OpenChannel)

Used to either create a new channel or attach to an existing channel. A channel with the name set to "", which is the same as having it unset, is called an anonymous channel. Anonymous channels cannot be attached to, unlike named channels.

This command is only ever used on the global channel (with id 0).

OpenChanRes(OpenChannelRes)

Used to determine whether a channel was or wasn't successfully created. This will contain the state of the channels creation, along with it's id or an error if there were any problems.

This command is only ever used on the global channel (with id 0).

CloseChan(CloseChannel)

Used to either close a channel or diconnect from an attached channel. The channel which is being effected should have its id provided. Note that if the global channel (with id 0) is provided, nothing will happen.

This command is only ever used on the global channel (with id 0).

CloseChanRes(CloseChannelRes)

Used to determine whether a channel was or wasn't successfully closed or disconnected. This will contain the state of the channels closure or disconnection, and whether nothing happened.

This command is only ever used on the global channel (with id 0).

ContainerState(ContainerState)

Used to notify the client about current state of the container. This is usually received along with the response of service commands.

This command is only ever used on the global channel (with id 0).

PortOpen(PortOpen)

Used to notify the client about the current address and port which the container is listening on. This is received when the container listens on the network.

This command is only ever used on the global channel (with id 0).

Toast(Toast)

Used to "send lil notifications to the client", this includes things such as human readable wanings.

This command is only ever used on the global channel (with id 0).

Redirect(Redirect)
RunMain(RunMain)
Clear(Clear)

Service specific:

  • "shellrun" and "shellrun2": Stops the running process and starts up another shell. This should only be used when the service's state is running.
  • "interp2": Used to kill the current prybar instance and starts another one.
Eval(String)

DEPRECATED: Please use "interp2"!

This command is only ever used by an "eval" service channel.

Result(String)

DEPRECATED: Please use "result"!

This command is only ever used by an "eval" service channel.

Input(String)

Used to send input to a running serive.

This command is used by many services.

Output(String)

Used to return output from a running servive.

This command is used by many services.

Error(String)

Used to signify that a command executed unsuccessfully, containing an error message.

This command is used by many services.

SaneTerm(SaneTerm)
ResizeTerm(ResizeTerm)
State(i32)

Used to signify the state of the service.

This command is used by many services.

Ok(Ok)

Used to signify that the service completed the action successfully.

This command is used by many services.

Persist(File)
PersistMirror(File)
Write(File)
Remove(File)
Move(Move)
TryRemove(File)
Mkdir(File)
Read(File)
Readdir(File)
Files(Files)
File(File)
CheckChanges(CheckChanges)
ChangedFiles(Files)
LintResults(LintResults)
RunContainedTest(ContainedTest)
TestResult(TestResult)
DebuggerStart(String)
DebuggerStep(RunMain)
DebuggerStatus(DebugStatus)
EnsurePackages(EnsurePackages)
Ping(Ping)
Pong(Pong)
Hello(Hello)
Goodbye(Goodbye)
Hint(Hint)
Connect(Connect)
Send(Send)
Recv(Recv)
Disconnect(Disconnect)
FileAuthReq(FileAuthReq)
FileAuthRes(FileAuthRes)
MutliFileAuthRes(MultiFileAuthRes)
ListObjects(ListObjects)
ListObjectsResp(ListObjectsResp)
Otstatus(OtStatus)
OtLinkFile(OtLinkFile)
OtNewCursor(OtCursor)
OtDeleteCursor(OtCursor)
OtFetchRequest(OtFetchRequest)
OtFetchResponse(OtFetchResponse)
Flush(Flush)
Debug(Debug)
StartVcr(StartVcr)
ReadVcr(ReadVcr)
VcrLog(VcrLog)
Auth(Auth)
ExecInfo(ExecInfo)
SubscribeFile(SubscribeFile)
FileEvent(FileEvent)
Roster(Roster)
Join(User)
Part(User)
Exec(Exec)
PackageSearch(PackageSearch)
PackageSearchResp(PackageSearchResp)
PackageInfo(PackageInfo)
PackageInfoResp(PackageInfoResp)
PackageAdd(PackageAdd)
PackageRemove(PackageRemove)
PackageInstall(PackageInstall)
PackageListSpecfile(PackageListSpecfile)
PackageListSpecfileResp(PackageListSpecfileResp)
PackageCacheSave(PackageCacheSave)
ChatMessage(ChatMessage)

Used to send a chat message to all listening clients. This chat message will be pushed onto the 100 message long scrollback.

This command is only ever used by a ["chat"] service channel.

ChatTyping(ChatTyping)

Used to send a chat event containing a users typing status to all listening clients.

This command is only ever used by a ["chat"] service channel.

ChatScrollback(ChatScrollback)
FsSnapshot(FsSnapshot)
FsTakeLock(FsLock)
FsReleaseLock(FsLock)
HasCap(bool)
Pid1Config(Pid1Config)

used to configure pid1 at runtime

Metrics(Metrics)
BootStatus(BootStatus)
ReadMeta(ReadMeta)

metadata store

WriteMeta(WriteMeta)
AppendMeta(AppendMeta)
Audio(Audio)

audio

PprofRequest(PprofRequest)
PprofResponse(PprofResponse)
Audio2(Audio2)
PtyConfig(PtyConfig)

used to set configure pty settings

Implementations

impl Body[src]

pub fn encode<B>(&self, buf: &mut B) where
    B: BufMut
[src]

pub fn merge<B>(
    field: &mut Option<Body>,
    tag: u32,
    wire_type: WireType,
    buf: &mut B,
    ctx: DecodeContext
) -> Result<(), DecodeError> where
    B: Buf
[src]

pub fn encoded_len(&self) -> usize[src]

Trait Implementations

impl Clone for Body[src]

impl Debug for Body[src]

impl PartialEq<Body> for Body[src]

impl StructuralPartialEq for Body[src]

Auto Trait Implementations

impl RefUnwindSafe for Body

impl Send for Body

impl Sync for Body

impl Unpin for Body

impl UnwindSafe for Body

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.