pub struct Target { /* private fields */ }Expand description
One process of a target’s role (§2.6–§2.10): the version it last acted
on or adopted, the one it holds while an act runs, per run the highest
seq it acted on or adopted (or the asof it reverted on), and its
report. A new process is a new Target, holding nothing (§2.7). Its
rules are desired.v1’s machine’s (machine::Core), read over runs
and seqs.
Implementations§
Source§impl Target
impl Target
Sourcepub fn new() -> Self
pub fn new() -> Self
A role at its start: nothing held, its report the baseline’s. An unbound role’s is the same, and stays so (§2.12).
Sourcepub fn report(&self) -> Report
pub fn report(&self) -> Report
The report, as the target puts it (§2.10). A revision above
MAX_REVISION has no code, so its version is reported without
one (§2.4).
Sourcepub fn remembered(&self, run: Run) -> Option<Seq>
pub fn remembered(&self, run: Run) -> Option<Seq>
The highest seq this process acted on or adopted a version of under
run, or the asof it reverted on, if it remembers the run (§2.6
step 4, §2.8).
Sourcepub fn held(&self) -> Option<Version>
pub fn held(&self) -> Option<Version>
The stamp a conditional read sends (§2.5): that of the latest
version the target admitted, the one it holds waiting, else the
running act’s, else the last it acted on or adopted. None where
it holds no version: nothing yet, or a snapshot with no entry it
admitted last.
Sourcepub fn holds(&self) -> Option<(Mutation, Version)>
pub fn holds(&self) -> Option<(Mutation, Version)>
Target::held, with whether that version is a put’s or a
delete’s, as a Watch moves its digest by.
Sourcepub fn observe(&mut self, s: Sample) -> Step
pub fn observe(&mut self, s: Sample) -> Step
Judges a version (§2.6): against the one last acted on or adopted
(the running act’s while one runs) and every run remembered, then,
while an act runs, against what waits: an act to start, adopted,
held while one runs, or ignored with why. After Step::Adopted
and Step::Confirmed the report may have changed.
Sourcepub fn observe_no_entry(&mut self, run: Run, asof: Seq) -> Step
pub fn observe_no_entry(&mut self, run: Run, asof: Seq) -> Step
Judges a snapshot with no entry (§2.8), its header’s run and its
asof: it reverts only where the target holds a document’s
version of that run with a seq at or below the asof. Under another
run, over a delete or with nothing held it is no verdict, and a
MUST NOT; built before the held version it is older. While an act
runs it is judged against the running act’s version, then against
what waits, and admitted by both it waits as a delete does.
Sourcepub fn unchanged(&mut self, sent: Version) -> Step
pub fn unchanged(&mut self, sent: Version) -> Step
A conditional read answered unchanged, by the held stamp sent
(§2.5): the author’s own word of that version, which judges
nothing and confirms a last-known one (§2.9). Step::Confirmed
where the target holds sent from an archive, else
Step::SameVersion.
Sourcepub fn finish(&mut self, ended: Ended) -> Step
pub fn finish(&mut self, ended: Ended) -> Step
Ends the running act (§2.7, §2.10): the report updated, then what
waits, if anything does, adopted or its act started, else
Step::Done. With no act running, nothing changes.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Target
impl Freeze for Target
impl Move for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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