pub trait GuestAgent: Send + Sync {
// Required methods
fn run<'life0, 'async_trait>(
&'life0 self,
start: StartCommand,
) -> Pin<Box<dyn Future<Output = Result<Receiver<Result<OutputChunk>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exec<'life0, 'async_trait>(
&'life0 self,
start: StartCommand,
) -> Pin<Box<dyn Future<Output = Result<(ExecInput, Receiver<Result<OutputChunk>>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_clock<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ClockSync>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reconfigure_network<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 NetReconfigCommand,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn wait_for_port<'life0, 'async_trait>(
&'life0 self,
port: u16,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<PortWait>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn files(&self) -> &dyn GuestFiles;
}Expand description
The agent inside one running Computer.
Required Methods§
Sourcefn run<'life0, 'async_trait>(
&'life0 self,
start: StartCommand,
) -> Pin<Box<dyn Future<Output = Result<Receiver<Result<OutputChunk>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
start: StartCommand,
) -> Pin<Box<dyn Future<Output = Result<Receiver<Result<OutputChunk>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run a command and stream its output. The final OutputChunk is
always OutputChunk::Exit.
Sourcefn exec<'life0, 'async_trait>(
&'life0 self,
start: StartCommand,
) -> Pin<Box<dyn Future<Output = Result<(ExecInput, Receiver<Result<OutputChunk>>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exec<'life0, 'async_trait>(
&'life0 self,
start: StartCommand,
) -> Pin<Box<dyn Future<Output = Result<(ExecInput, Receiver<Result<OutputChunk>>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start an interactive session: input sink, output stream.
Sourcefn sync_clock<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ClockSync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_clock<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ClockSync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set the guest wall clock to the host’s now.
Err is a failed round trip; ClockSync::AgentError is an agent
that answered but could not set the clock, which still proves
liveness.
Sourcefn reconfigure_network<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 NetReconfigCommand,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reconfigure_network<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 NetReconfigCommand,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Re-address the guest after a restore onto a fresh network.
Sourcefn wait_for_port<'life0, 'async_trait>(
&'life0 self,
port: u16,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<PortWait>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_port<'life0, 'async_trait>(
&'life0 self,
port: u16,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<PortWait>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Wait until the guest’s own listen table has a listener on port —
never a connect probe, which would perturb the workload.
Sourcefn files(&self) -> &dyn GuestFiles
fn files(&self) -> &dyn GuestFiles
The file channel into this Computer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".