pub struct Target { /* private fields */ }Expand description
One instance 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 id the latest
time it acted on or adopted (F-163), and its report. A restart is a new
Target, holding nothing (§2.7). Its rules are machine::Core’s,
which desired.v2’s target shares (v2::Target).
Implementations§
Source§impl Target
impl Target
Sourcepub fn new(key: Option<String>) -> Self
pub fn new(key: Option<String>) -> Self
A role bound to the slice key, or unbound (None, §2.12), at its
start: nothing held, its report the baseline’s.
Sourcepub fn remembered(&self, id: u128) -> Option<u64>
pub fn remembered(&self, id: u128) -> Option<u64>
The latest time this instance acted on or adopted a version of id
at, if it remembers the id (§2.6 step 4).
Sourcepub fn observe(&mut self, s: Sample) -> Step
pub fn observe(&mut self, s: Sample) -> Step
Judges a sample (§2.6): against the version last acted on or adopted
(the running act’s while one runs) and every id remembered, then,
while an act runs, against the version held waiting (§2.7, text
0.2, F-162): an act to start, adopted, held while one runs, or
ignored with why. After Step::Adopted the report changed.
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 the
held version, if one is held, adopted or its act started, else
Step::Done. With no act running, nothing changes, and it is
Step::Done.
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 Targetwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(u128, u64, bool)>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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