pub struct Alignments { /* private fields */ }Expand description
The alignment verdicts of every print, what decides them, and the frame each print’s last check was given.
Implementations§
Source§impl Alignments
impl Alignments
Sourcepub fn new(
state_dir: &Path,
calibration: Option<Arc<CameraCalibration>>,
prints: Arc<dyn PrintStore>,
) -> Result<Self>
pub fn new( state_dir: &Path, calibration: Option<Arc<CameraCalibration>>, prints: Arc<dyn PrintStore>, ) -> Result<Self>
The verdicts kept under one state directory.
§Errors
The filesystem’s own error when the directory cannot be made.
Sourcepub fn calibration(&self) -> Option<&CameraCalibration>
pub fn calibration(&self) -> Option<&CameraCalibration>
The camera calibration in force, when one is configured.
Sourcepub fn previous_check(&self, print_id: PrintId) -> Option<PreviousCheck>
pub fn previous_check(&self, print_id: PrintId) -> Option<PreviousCheck>
The frame one print’s last check was given; nothing before its first check, or when the record cannot be read back.
Sourcepub fn record_check(&self, print_id: PrintId, check: &PreviousCheck)
pub fn record_check(&self, print_id: PrintId, check: &PreviousCheck)
Name the frame one print’s check was given, which its next check shows
as the previous. A record the filesystem refuses for a moment is
replaced once the refusal passes ([replace_file]); one it goes on
refusing is said on the log and leaves the record before it standing,
so the next check shows an older frame as the previous rather than
none. No test makes the refusal last: that needs the state directory
made to refuse writes beneath a running server, which refuses the
store’s own writes first. What a check makes of a record it cannot use
— an empty panel 3 — is proved by
a_lost_previous_frame_empties_panel_3_and_the_record_goes_with_the_print.
Sourcepub fn print_alignment(&self, print_id: PrintId) -> PrintAlignment
pub fn print_alignment(&self, print_id: PrintId) -> PrintAlignment
One print’s verdict as it stands.
Sourcepub async fn check(
&self,
supervisor: &Supervisor,
active: ActiveJob,
) -> Option<PrintAlignment>
pub async fn check( &self, supervisor: &Supervisor, active: ActiveJob, ) -> Option<PrintAlignment>
Rule on the running print’s alignment once its first object layer is down, when it has no verdict yet. Answers the verdict it wrote, and nothing when it wrote none — not yet due, or no good frame came.
Sourcepub async fn sweep(&self)
pub async fn sweep(&self)
Delete the verdict and the last check’s record of every print that is not open.
A store that cannot list the open prints, a directory that cannot be
listed and a file that cannot be removed each leave a verdict behind,
which the next read’s sweep tries again. No test makes either refuse,
since that needs a store or filesystem made to fail beneath a running
server; the aligning journeys prove the sweep removes a closed
print’s verdict and keeps an open one’s, after a close and at start.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Alignments
impl !UnwindSafe for Alignments
impl Forget for Alignments
impl Freeze for Alignments
impl Move for Alignments
impl Send for Alignments
impl Sync for Alignments
impl Unpin for Alignments
impl UnsafeUnpin for Alignments
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.