Skip to main content

RunResult

Struct RunResult 

Source
pub struct RunResult { /* private fields */ }
Expand description

A finished (or partial) run.

Implementations§

Source§

impl RunResult

Source

pub fn status(&self) -> &str

complete, partial or error.

Source

pub fn error(&self) -> Option<&str>

The failure that ended the run early, if one did.

Source

pub fn frames(&self) -> u32

Frames analysed.

Source

pub fn rendered_frames(&self) -> u32

Source

pub fn seconds(&self) -> f64

Wall-clock seconds the run took.

Source

pub fn project(&self) -> &Obj

The project row (as the page stores it).

Source

pub fn diagnostics(&self) -> &[Diagnostic]

Every diagnostic, in emission order, in the run’s display language.

Source

pub fn display_name(&self, canvas: &CanvasInfo) -> String

canvas’s name in the run’s language (Content canvas 1 in English), as the page shows it.

Source

pub fn store(&self) -> &Store

Every stored row.

Source

pub fn get(&self, key: &str) -> Option<Js>

The run-relative stored row key (e.g. performance, canvas/<id>).

Source

pub fn canvases(&self) -> Vec<CanvasInfo>

Every canvas, in key order.

Source

pub fn prints(&self) -> Vec<CanvasInfo>

Every canvas worth a PNG, in the order the page lists them (its canvas menu, and prints in the npm package): framed presentations first when the run framed them (crate::Framing::Context), then reconstructed content, then screen-fixed interface, each by observed pixels, most first. A canvas without tiles (a fragment that later evidence merged into another canvas holds none) is left out.

Source

pub fn print(&self) -> Option<CanvasInfo>

The print: the canvas the page shows first, the first of RunResult::prints.

Source

pub fn fragments(&self) -> Vec<CanvasInfo>

The reconstructed content other than the print’s own, in the page’s order: separate fragments the run could not place.

Source

pub fn tile(&self, canvas: &str, x: i32, y: i32) -> Option<Vec<u8>>

The level-0 tile (x, y) of canvas as tile_size × tile_size RGBA, if it was painted.

Source

pub fn tile_size(&self) -> usize

Source

pub fn canvas_size(&self, canvas: &str) -> Result<(u32, u32)>

The size in pixels of the image RunResult::write_png and RunResult::read_rows give for canvas.

Source

pub fn read_rows( &self, canvas: &str, row: impl FnMut(&[u8]) -> Result<()>, ) -> Result<(u32, u32)>

Hands row each row of canvas’s bounds as RGBA (unobserved pixels transparent), top to bottom, decoding one band of tiles at a time, so memory stays at one tile row however long the print is.

Source

pub fn write_png<W: Write>(&self, canvas: &str, out: W) -> Result<(u32, u32)>

Writes canvas’s bounds as one RGBA PNG (unobserved pixels transparent), one band of tiles at a time, so memory stays at one tile row however long the print is.

Source

pub fn fingerprint(&self) -> (BTreeMap<String, String>, String)

Every row’s fingerprint digest, keyed as scripts/fingerprint-scenarios.ts keys them (<run> for the run id), plus the project row’s digest.

Trait Implementations§

Source§

impl Debug for RunResult

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, 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.