pub struct MemberView<'a> { /* private fields */ }Expand description
A borrowed view of one independently stateful member inside an execution unit.
The identity, state owner, and schema allocation must remain stable at the
same member index for the complete execution. completion and
target_iteration are declarations inspected by Workflow; constructing a
view has no side effects.
Implementations§
Source§impl<'a> MemberView<'a>
impl<'a> MemberView<'a>
Sourcepub const fn new(
identity: &'a str,
state: &'a SystemState,
completion: Option<MemberCompletion<'a>>,
target_iteration: Option<u64>,
) -> Self
pub const fn new( identity: &'a str, state: &'a SystemState, completion: Option<MemberCompletion<'a>>, target_iteration: Option<u64>, ) -> Self
Describes one member owned by an ExecutionUnit.
identity must be nonempty, contain no surrounding whitespace, and be
unique within the unit. state must remain at the same address and use
the schema supplied to ExecutionUnit::initialize. A target, when
present, must not precede the state’s current iteration.
Sourcepub const fn identity(self) -> &'a str
pub const fn identity(self) -> &'a str
Returns the stable identity of this member within its execution unit.
Sourcepub const fn state(self) -> &'a SystemState
pub const fn state(self) -> &'a SystemState
Borrows this member’s directly owned canonical state.
Sourcepub const fn completion(self) -> Option<MemberCompletion<'a>>
pub const fn completion(self) -> Option<MemberCompletion<'a>>
Returns completion details, or None while the member is incomplete.
Sourcepub const fn target_iteration(self) -> Option<u64>
pub const fn target_iteration(self) -> Option<u64>
Returns this member’s optional expected final iteration.
Trait Implementations§
Source§impl<'a> Clone for MemberView<'a>
impl<'a> Clone for MemberView<'a>
impl<'a> Copy for MemberView<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MemberView<'a>
impl<'a> !Send for MemberView<'a>
impl<'a> !Sync for MemberView<'a>
impl<'a> !UnwindSafe for MemberView<'a>
impl<'a> Freeze for MemberView<'a>
impl<'a> Unpin for MemberView<'a>
impl<'a> UnsafeUnpin for MemberView<'a>
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> 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