Skip to main content

Seen

Enum Seen 

Source
pub enum Seen {
    Marker {
        line: String,
        after: Duration,
    },
    StillRunning {
        tail: String,
        waited: Duration,
    },
    Exited {
        code: Option<i32>,
        tail: String,
        after: Duration,
    },
}
Expand description

What was actually observed while waiting on a running instance — the return of exe::ExeBoot::await_marker and of kvm::KvmBoot::await_serial_marker.

Note what is missing: there is no Ok/Fail, no “ready”. Every one of these outcomes can be the right answer depending on what the caller asked, and a type that guessed would be inventing the verdict the caller exists to make. It carries the evidence instead.

It lives at the crate root, not inside a backend, because it is the one stage-2 observation shape: a process’s captured stdout/stderr and a VM’s serial console are the same question (“did the named line appear before the deadline?”) asked of two different streams, and a per-backend copy would be two definitions of “seen” that drift.

Variants§

§

Marker

The named marker appeared in the captured output. Carries the whole line it appeared on — the applied output, not the fact that a boolean flipped.

Fields

§line: String

The full output line containing the marker.

§after: Duration

How long after the wait started it appeared.

§

StillRunning

The deadline elapsed with the process still running and the marker not seen. This is not automatically a failure: for a server, still-running is the healthy state, and the caller may well have been waiting to confirm exactly that. Carries the tail of what was captured so the caller can say why.

Fields

§tail: String

The last lines captured, so a report can quote real output.

§waited: Duration

The budget that elapsed.

§

Exited

The process terminated before the marker appeared. For a server this is the real failure, and the exit status plus tail is the evidence.

Fields

§code: Option<i32>

Exit code, or None if it was killed by a signal.

§tail: String

The last lines captured.

§after: Duration

How long it ran.

Implementations§

Source§

impl Seen

Source

pub fn saw_marker(&self) -> bool

Whether the named marker was observed — the one question with a single honest boolean answer.

Source

pub fn detail(&self) -> String

A one-line, quotable summary carrying the applied output (the matched line, or the tail that was captured instead) — what a matrix cell’s detail should say so a red names what happened rather than that something did not.

Trait Implementations§

Source§

impl Clone for Seen

Source§

fn clone(&self) -> Seen

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 Seen

Source§

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

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

impl Eq for Seen

Source§

impl PartialEq for Seen

Source§

fn eq(&self, other: &Seen) -> 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 Seen

Auto Trait Implementations§

§

impl Freeze for Seen

§

impl RefUnwindSafe for Seen

§

impl Send for Seen

§

impl Sync for Seen

§

impl Unpin for Seen

§

impl UnsafeUnpin for Seen

§

impl UnwindSafe for Seen

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