Skip to main content

Guest

Enum Guest 

Source
pub enum Guest {
    Off,
    Installing,
    Installed,
    Looping {
        rounds: u32,
    },
    TemplateFirstBoot,
    Panicked,
}
Expand description

What the guest is doing. The mock keeps this even without the kvm feature, because the API’s answers depend on it (an installer that loops never leaves Installing) and because the KVM half must have somewhere to report to.

Variants§

§

Off

No medium, nothing to run.

§

Installing

The installer is running. ~10 s, and nothing narrates it: PID 1 brings no network up (behaviour 20) and there is no serial console (behaviour 13), so this window is silent by construction.

§

Installed

The installer finished and the box booted its disk.

§

Looping

The installer ran again, because the CD is still first in the boot order (behaviour 17). A mock whose guest could not do this could not reproduce the loop that cost an afternoon.

Fields

§rounds: u32
§

TemplateFirstBoot

The Ubuntu template’s first boot: dpkg lock-frontend is held by unattended-upgrade-shutdown --wait-for-signal for the LIFE of the boot, so an apt-get update blocks rather than failing (behaviour 21).

§

Panicked

PID 1 panicked. Invisible except on the framebuffer (behaviour 13).

Trait Implementations§

Source§

impl Clone for Guest

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 Copy for Guest

Source§

impl Debug for Guest

Source§

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

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

impl Eq for Guest

Source§

impl PartialEq for Guest

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 StructuralPartialEq for Guest

Auto Trait Implementations§

§

impl Freeze for Guest

§

impl RefUnwindSafe for Guest

§

impl Send for Guest

§

impl Sync for Guest

§

impl Unpin for Guest

§

impl UnsafeUnpin for Guest

§

impl UnwindSafe for Guest

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