Skip to main content

ApiAction

Enum ApiAction 

Source
pub enum ApiAction {
Show 32 variants PutBootSource(BootSourceConfig), PutDrive(DriveConfig), PatchDrive(DrivePatch), DeleteDrive { drive_id: DriveId, }, PutNetwork(NetworkInterfaceConfig), PatchNetwork(NetworkPatch), DeleteNetwork { iface_id: IfaceId, }, PutVsock(VsockConfig), PutMmds(MmdsContents), PatchMmds(MmdsContents), PutMmdsConfig(MmdsConfig), PutBalloon(BalloonConfig), PatchBalloon(BalloonUpdate), PatchBalloonStats(BalloonStatsUpdate), PatchBalloonHinting { op: BalloonHintingOp, }, PutEntropy(EntropyConfig), PutSerial(SerialConfig), PutPmem(PmemConfig), PatchPmem(PmemPatch), DeletePmem { pmem_id: DriveId, }, PutHotplugMemory(HotplugMemoryConfig), PatchHotplugMemory(HotplugMemoryUpdate), PutCpuConfig(CpuConfig), PutMachineConfig(MachineConfig), PatchMachineConfig(MachineConfigPatch), PutLogger(LoggerConfig), PutMetrics(MetricsConfig), Action(InstanceAction), PatchVm(VmStateChange), SnapshotCreate(SnapshotCreateConfig), SnapshotLoad(SnapshotLoadConfig), Shutdown,
}
Expand description

Mutating action posted onto the API → VMM channel.

Variants§

§

PutBootSource(BootSourceConfig)

PUT /boot-source.

§

PutDrive(DriveConfig)

PUT /drives/{id}.

§

PatchDrive(DrivePatch)

PATCH /drives/{id}.

§

DeleteDrive

DELETE /drives/{id}.

Fields

§drive_id: DriveId

Validated drive ID.

§

PutNetwork(NetworkInterfaceConfig)

PUT /network-interfaces/{id}.

§

PatchNetwork(NetworkPatch)

PATCH /network-interfaces/{id}.

§

DeleteNetwork

DELETE /network-interfaces/{id}.

Fields

§iface_id: IfaceId

Validated interface ID.

§

PutVsock(VsockConfig)

PUT /vsock.

§

PutMmds(MmdsContents)

PUT /mmds — replace MMDS data store.

§

PatchMmds(MmdsContents)

PATCH /mmds — JSON-merge-patch on the data store.

§

PutMmdsConfig(MmdsConfig)

PUT /mmds/config.

§

PutBalloon(BalloonConfig)

PUT /balloon.

§

PatchBalloon(BalloonUpdate)

PATCH /balloon.

§

PatchBalloonStats(BalloonStatsUpdate)

PATCH /balloon/statistics.

§

PatchBalloonHinting

PATCH /balloon/hinting/{op}.

Fields

§op: BalloonHintingOp

start | status | stop.

§

PutEntropy(EntropyConfig)

PUT /entropy.

§

PutSerial(SerialConfig)

PUT /serial.

§

PutPmem(PmemConfig)

PUT /pmem/{id}.

§

PatchPmem(PmemPatch)

PATCH /pmem/{id}.

§

DeletePmem

DELETE /pmem/{id}.

Fields

§pmem_id: DriveId

Validated pmem ID.

§

PutHotplugMemory(HotplugMemoryConfig)

PUT /hotplug/memory.

§

PatchHotplugMemory(HotplugMemoryUpdate)

PATCH /hotplug/memory.

§

PutCpuConfig(CpuConfig)

PUT /cpu-config.

§

PutMachineConfig(MachineConfig)

PUT /machine-config.

§

PatchMachineConfig(MachineConfigPatch)

PATCH /machine-config.

§

PutLogger(LoggerConfig)

PUT /logger.

§

PutMetrics(MetricsConfig)

PUT /metrics.

§

Action(InstanceAction)

PUT /actions — every action variant including InstanceStart.

§

PatchVm(VmStateChange)

PATCH /vm — pause/resume.

§

SnapshotCreate(SnapshotCreateConfig)

PUT /snapshot/create.

§

SnapshotLoad(SnapshotLoadConfig)

PUT /snapshot/load.

§

Shutdown

SIGINT / process shutdown.

Implementations§

Source§

impl ApiAction

Source

pub const fn class(&self) -> ActionClass

The timeout class for this action.

Source

pub const fn is_pre_boot(&self) -> bool

true if this action should be admissible before the microVM has booted.

Source

pub const fn is_post_boot(&self) -> bool

true if this action is admissible after the microVM has booted.

Source

pub const fn label(&self) -> &'static str

Human-readable label for log lines.

Trait Implementations§

Source§

impl Debug for ApiAction

Source§

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

Formats the value using the given formatter. 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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,