pub struct RunResult { /* private fields */ }Expand description
A finished (or partial) run.
Implementations§
Source§impl RunResult
impl RunResult
pub fn rendered_frames(&self) -> u32
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Every diagnostic, in emission order, in the run’s display language.
Sourcepub fn display_name(&self, canvas: &CanvasInfo) -> String
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.
Sourcepub fn get(&self, key: &str) -> Option<Js>
pub fn get(&self, key: &str) -> Option<Js>
The run-relative stored row key (e.g. performance, canvas/<id>).
Sourcepub fn canvases(&self) -> Vec<CanvasInfo>
pub fn canvases(&self) -> Vec<CanvasInfo>
Every canvas, in key order.
Sourcepub fn prints(&self) -> Vec<CanvasInfo>
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.
Sourcepub fn print(&self) -> Option<CanvasInfo>
pub fn print(&self) -> Option<CanvasInfo>
The print: the canvas the page shows first, the first of RunResult::prints.
Sourcepub fn fragments(&self) -> Vec<CanvasInfo>
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.
Sourcepub fn tile(&self, canvas: &str, x: i32, y: i32) -> Option<Vec<u8>>
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.
pub fn tile_size(&self) -> usize
Sourcepub fn canvas_size(&self, canvas: &str) -> Result<(u32, u32)>
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.
Sourcepub fn read_rows(
&self,
canvas: &str,
row: impl FnMut(&[u8]) -> Result<()>,
) -> Result<(u32, u32)>
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RunResult
impl RefUnwindSafe for RunResult
impl Send for RunResult
impl Sync for RunResult
impl Unpin for RunResult
impl UnsafeUnpin for RunResult
impl UnwindSafe for RunResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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