pub struct PollResult { /* private fields */ }Expand description
The result prepared by super::LeaderElection::poll.
Keep this value inside the transaction callback until the enclosing
Database::run succeeds. Before then, the
transaction can retry, be cancelled, or fail to commit. On success, inspect
Self::outcome and carry Self::next into the next poll, for example
with LocalState::adopt.
Implementations§
Source§impl PollResult
impl PollResult
Sourcepub fn outcome(&self) -> &PollOutcome
pub fn outcome(&self) -> &PollOutcome
Returns the role and fencing rank prepared by this transaction attempt.
See PollOutcome for when the rank is usable for protected work.
Sourcepub fn next(&self) -> &NextState
pub fn next(&self) -> &NextState
Returns the clock-free state to carry into the next poll.
Adopt it only after the enclosing Database::run
succeeds, anchoring it on the caller’s clock as described by
LocalState::adopt.
Trait Implementations§
Source§impl Clone for PollResult
impl Clone for PollResult
Source§fn clone(&self) -> PollResult
fn clone(&self) -> PollResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PollResult
impl Debug for PollResult
Source§impl PartialEq for PollResult
impl PartialEq for PollResult
impl Eq for PollResult
impl StructuralPartialEq for PollResult
Auto Trait Implementations§
impl Freeze for PollResult
impl RefUnwindSafe for PollResult
impl Send for PollResult
impl Sync for PollResult
impl Unpin for PollResult
impl UnwindSafe for PollResult
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
Mutably borrows from an owned value. Read more