pub struct UpdateOutcome<T, E, R = (), DO = DropUndecided, const EVENTS_DECIDED: bool = false> { /* private fields */ }Expand description
What an update performed under the lock produced: the events to queue, a value to drop once they were delivered, and the result to give back to the caller.
The two type-state parameters make each effect settable at most once, and let the arms of a
branching update share one type: an arm that sets no events next to one that does still has to
say so, with Self::without_events.
Implementations§
Source§impl<T, E, R> UpdateOutcome<T, E, R>
impl<T, E, R> UpdateOutcome<T, E, R>
Source§impl<T, E> UpdateOutcome<T, E>
impl<T, E> UpdateOutcome<T, E>
Source§impl<T, E, R, const EVENTS_DECIDED: bool> UpdateOutcome<T, E, R, DropUndecided, EVENTS_DECIDED>
impl<T, E, R, const EVENTS_DECIDED: bool> UpdateOutcome<T, E, R, DropUndecided, EVENTS_DECIDED>
pub fn with_drop_outside<DO>( self, drop_outside: DO, ) -> UpdateOutcome<T, E, R, DropDecided<DO>, EVENTS_DECIDED>
pub fn without_drop_outside<DO>( self, ) -> UpdateOutcome<T, E, R, DropDecided<DO>, EVENTS_DECIDED>
Source§impl<T, E, R, DO> UpdateOutcome<T, E, R, DO, false>
impl<T, E, R, DO> UpdateOutcome<T, E, R, DO, false>
pub fn with_next_event(self, next: T) -> UpdateOutcome<T, E, R, DO, true>
pub fn with_termination_event( self, termination: Termination<E>, ) -> UpdateOutcome<T, E, R, DO, true>
pub fn with_next_and_termination_events( self, next: T, termination: Termination<E>, ) -> UpdateOutcome<T, E, R, DO, true>
pub fn with_events( self, events: EventBatch<T, E>, ) -> UpdateOutcome<T, E, R, DO, true>
pub fn without_events(self) -> UpdateOutcome<T, E, R, DO, true>
Trait Implementations§
Auto Trait Implementations§
impl<T, E, R, DO, const EVENTS_DECIDED: bool> Freeze for UpdateOutcome<T, E, R, DO, EVENTS_DECIDED>
impl<T, E, R, DO, const EVENTS_DECIDED: bool> RefUnwindSafe for UpdateOutcome<T, E, R, DO, EVENTS_DECIDED>
impl<T, E, R, DO, const EVENTS_DECIDED: bool> Send for UpdateOutcome<T, E, R, DO, EVENTS_DECIDED>
impl<T, E, R, DO, const EVENTS_DECIDED: bool> Sync for UpdateOutcome<T, E, R, DO, EVENTS_DECIDED>
impl<T, E, R, DO, const EVENTS_DECIDED: bool> Unpin for UpdateOutcome<T, E, R, DO, EVENTS_DECIDED>
impl<T, E, R, DO, const EVENTS_DECIDED: bool> UnsafeUnpin for UpdateOutcome<T, E, R, DO, EVENTS_DECIDED>
impl<T, E, R, DO, const EVENTS_DECIDED: bool> UnwindSafe for UpdateOutcome<T, E, R, DO, EVENTS_DECIDED>
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