Skip to main content

Reply

Enum Reply 

Source
#[non_exhaustive]
pub enum Reply {
Show 22 variants Hello { id: u64, protocol: u32, version: String, }, Accepted { id: u64, operation: OperationId, run: RunName, position: u32, }, Status { id: u64, status: Box<Status>, }, Variables { id: u64, variables: Vec<InputVariable>, }, Runs { id: u64, runs: Vec<RunRow>, }, Run { id: u64, run: Option<Box<RunRow>>, }, Shell { id: u64, command: ShellCommand, }, Console { id: u64, console: Box<ReachedConsole>, }, ConsoleClosed { id: u64, reason: String, }, Native { id: u64, console: NativeConsole, }, Endpoints { id: u64, endpoints: Vec<ServiceEndpoint>, }, Usage { id: u64, machines: Vec<MachineUsage>, }, PublicKey { id: u64, key: String, }, Downloads { id: u64, downloads: Vec<Download>, }, DownloadsRemoved { id: u64, removed: Vec<DownloadRemoval>, }, DownloadsAdopted { id: u64, adopted: Vec<Download>, }, AddressBlocks { id: u64, blocks: Vec<String>, }, Operations { id: u64, operations: Vec<OperationRow>, }, Ok { id: u64, }, Error { id: u64, report: ErrorReport, }, Busy { id: u64, operations: Vec<OperationId>, }, Event { cursor: EventCursor, event: Box<Event>, },
}
Expand description

What the service writes.

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.
§

Hello

To hello.

Fields

§id: u64

The request’s id.

§protocol: u32

The protocol it speaks.

§version: String

Its version.

§

Accepted

An operation command was accepted: its id, and its place on its run (0: it begins now; 1: it waits for the run’s cancelled operation to end).

Fields

§id: u64

The request’s id.

§operation: OperationId

The operation’s id.

§run: RunName

Its run.

§position: u32

How many of the run’s operations are ahead of it.

§

Status

To status.

Fields

§id: u64

The request’s id.

§status: Box<Status>

The status.

§

Variables

To variables.

Fields

§id: u64

The request’s id.

§variables: Vec<InputVariable>

The folder’s input variables, by name.

§

Runs

To list (every recorded run) and expired (those past their lifetime).

Fields

§id: u64

The request’s id.

§runs: Vec<RunRow>

The runs.

§

Run

To record.

Fields

§id: u64

The request’s id.

§run: Option<Box<RunRow>>

The run’s record; none for a run never recorded.

§

Shell

To console_command.

Fields

§id: u64

The request’s id.

§command: ShellCommand

The command that opens the console.

§

Console

To graphical_console.

Fields

§id: u64

The request’s id.

§console: Box<ReachedConsole>

Where the console answers, and how to sign in.

§

ConsoleClosed

After a graphical_console reached through a tunnel, once the tunnel ended on its own (its ssh exited): the service closes the connection after it.

Fields

§id: u64

The graphical_console request’s id.

§reason: String

How the tunnel ended.

§

Native

To native_console.

Fields

§id: u64

The request’s id.

§console: NativeConsole

What opens the machine in its hypervisor’s app.

§

Endpoints

To service_endpoints.

Fields

§id: u64

The request’s id.

§endpoints: Vec<ServiceEndpoint>

The endpoints, by name.

§

Usage

To usage.

Fields

§id: u64

The request’s id.

§machines: Vec<MachineUsage>

Each running machine’s use, by name.

§

PublicKey

To public_key.

Fields

§id: u64

The request’s id.

§key: String

The key’s public half, one line.

§

Downloads

To downloads.

Fields

§id: u64

The request’s id.

§downloads: Vec<Download>

The recorded downloads, oldest first.

§

DownloadsRemoved

To remove_downloads: how each removal went, in the order asked.

Fields

§id: u64

The request’s id.

§removed: Vec<DownloadRemoval>

Each removal.

§

DownloadsAdopted

To adopt_downloads: the downloads recorded for those asked, new or not.

Fields

§id: u64

The request’s id.

§adopted: Vec<Download>

The recorded downloads.

§

AddressBlocks

To address_blocks_in_use: the blocks, in CIDR form.

Fields

§id: u64

The request’s id.

§blocks: Vec<String>

The blocks.

§

Operations

To operations.

Fields

§id: u64

The request’s id.

§operations: Vec<OperationRow>

The operations, newest first.

§

Ok

Done (subscribe, unsubscribe, cancel, shutdown, shutdown_if_idle).

Fields

§id: u64

The request’s id.

§

Error

Refused, or failed.

Fields

§id: u64

The request’s id (0 for a line that couldn’t be read as a request).

§report: ErrorReport

Why: its code, message and typed fields, as the runner reports a failure.

§

Busy

To shutdown_if_idle, refused: the operations queued or running, which the service goes on with.

Fields

§id: u64

The request’s id.

§operations: Vec<OperationId>

The operations, oldest first.

§

Event

A subscription’s frame.

Fields

§cursor: EventCursor

Its place in the stream.

§event: Box<Event>

The event.

Implementations§

Source§

impl Reply

Source

pub fn id(&self) -> Option<u64>

The request it answers; None for a subscription’s frame.

Trait Implementations§

Source§

impl Clone for Reply

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Reply

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Reply

Source§

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 Reply

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Reply

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Reply

Auto Trait Implementations§

§

impl Forget for Reply

§

impl Freeze for Reply

§

impl Move for Reply

§

impl RefUnwindSafe for Reply

§

impl Send for Reply

§

impl Sync for Reply

§

impl Unpin for Reply

§

impl UnsafeUnpin for Reply

§

impl UnwindSafe for Reply

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryClone for T
where T: Clone,

Source§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more