pub trait CheckImages: Send + Sync {
// Required method
fn check_image(
&self,
print_id: Option<PrintId>,
frame: &Path,
) -> Result<PathBuf, String>;
// Provided methods
fn shown_image(
&self,
request: &CheckImageRequest<'_>,
) -> Result<ShownImage, String> { ... }
fn composes(&self, print_id: PrintId) -> bool { ... }
fn restart_growth(&self, print_id: PrintId) { ... }
}Expand description
What makes a check’s image of one stored frame.
Required Methods§
Sourcefn check_image(
&self,
print_id: Option<PrintId>,
frame: &Path,
) -> Result<PathBuf, String>
fn check_image( &self, print_id: Option<PrintId>, frame: &Path, ) -> Result<PathBuf, String>
The path of the image a check of print_id — or a look at the printer,
when it names none — is shown of the frame stored at frame, or why
none could be made.
§Errors
Answers why the image could not be made: the frame unreadable, or the image unwritable.
Provided Methods§
Sourcefn shown_image(
&self,
request: &CheckImageRequest<'_>,
) -> Result<ShownImage, String>
fn shown_image( &self, request: &CheckImageRequest<'_>, ) -> Result<ShownImage, String>
The image one request is shown and the line saying what it is: by
default check_image’s, saying nothing.
§Errors
As check_image’s.
Sourcefn composes(&self, print_id: PrintId) -> bool
fn composes(&self, print_id: PrintId) -> bool
Whether a check of print_id would be shown the three-panel image of a
frame from the server’s own camera: by default, never.
Sourcefn restart_growth(&self, print_id: PrintId)
fn restart_growth(&self, print_id: PrintId)
Measure print_id’s growth only from frames checked after now: it
waited at a planned change, and a frame from before the wait would
count the wait as no growth. By default there is nothing to forget.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".