Skip to main content

JobOperation

Enum JobOperation 

Source
#[non_exhaustive]
pub enum JobOperation { Hello, Start { id: JobId, command: ExecRequest, no_stdin: bool, input_base64: Option<String>, timeout_ms: Option<u64>, }, List { all: bool, limit: usize, cursor: Option<JobId>, }, Inspect { id: JobId, }, Read { id: JobId, after: u64, attachment: Option<String>, }, Attach { id: JobId, attachment: String, read_only: bool, }, Detach { id: JobId, attachment: String, }, Renew { id: JobId, attachment: String, }, Write { id: JobId, attachment: String, data_base64: String, }, Resize { id: JobId, attachment: String, rows: u16, cols: u16, }, Signal { id: JobId, signal: i32, }, Eof { id: JobId, }, }
Expand description

Host-only operations. None waits for a process to exit or for output to become available.

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

Discover support without creating a process.

§

Start

Admit a launch exactly once for this ID and command fingerprint.

Fields

§id: JobId

Client-generated random identity and idempotency key.

§command: ExecRequest

Existing guest command contract.

§no_stdin: bool

Close guest stdin immediately after confirmed spawn.

§input_base64: Option<String>

Optional finite pipe input (at most 64 KiB), followed by EOF.

§timeout_ms: Option<u64>

Host-enforced elapsed execution limit in milliseconds.

§

List

List active or all retained jobs.

Fields

§all: bool

Include terminal records.

§limit: usize

Maximum page size (1..=100).

§cursor: Option<JobId>

Continue after this identity.

§

Inspect

Inspect one retained job.

Fields

§id: JobId

Owning job identity.

§

Read

Read bounded output, optionally renewing an attachment lease.

Fields

§id: JobId

Owning job identity.

§after: u64

Resume strictly after this output sequence.

§attachment: Option<String>

Opaque attachment lease token.

§

Attach

Acquire one attachment. Reusing the same token is idempotent.

Fields

§id: JobId

Owning job identity.

§attachment: String

Opaque attachment lease token.

§read_only: bool

Observe without acquiring input ownership.

§

Detach

Release an attachment without EOF or process termination.

Fields

§id: JobId

Owning job identity.

§attachment: String

Lease to release.

§

Renew

Keep an attachment alive without consuming output.

Fields

§id: JobId

Owning job identity.

§attachment: String

Lease to renew.

§

Write

Queue input for the current input-owning attachment.

Fields

§id: JobId

Owning job identity.

§attachment: String

Opaque attachment lease token.

§data_base64: String

Original input bytes encoded as base64.

§

Resize

Resize the terminal for the input-owning attachment.

Fields

§id: JobId

Owning job identity.

§attachment: String

Opaque attachment lease token.

§rows: u16

Nonzero terminal row count.

§cols: u16

Nonzero terminal column count.

§

Signal

Send a Linux guest process-group signal.

Fields

§id: JobId

Owning job identity.

§signal: i32

Linux guest signal number.

§

Eof

Close a pipe after already admitted input; invalid for PTYs.

Fields

§id: JobId

Owning job identity.

Trait Implementations§

Source§

impl Clone for JobOperation

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 JobOperation

Source§

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

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

impl<'de> Deserialize<'de> for JobOperation

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 Serialize for JobOperation

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

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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