pub struct PreviousThreadBinding { /* private fields */ }Expand description
Opaque previous-task binding consumed by the incoming switch tail.
Implementations§
Source§impl PreviousThreadBinding
impl PreviousThreadBinding
Sourcepub unsafe fn finish(
self,
previous: Pin<&CurrentThreadHeader>,
) -> Result<(), ThreadSwitchError>
pub unsafe fn finish( self, previous: Pin<&CurrentThreadHeader>, ) -> Result<(), ThreadSwitchError>
Withdraws the exact previous binding after architecture registers have switched to the incoming task.
§Errors
Returns ThreadSwitchError::PreviousThreadMismatch if previous
differs from the prepared task, or
ThreadSwitchError::StalePreviousBinding for an obsolete tail.
§Safety
The incoming switch tail must be the sole owner of this token and the previous task allocation must remain pinned and alive.
Trait Implementations§
Auto Trait Implementations§
impl !Send for PreviousThreadBinding
impl !Sync for PreviousThreadBinding
impl Freeze for PreviousThreadBinding
impl RefUnwindSafe for PreviousThreadBinding
impl Unpin for PreviousThreadBinding
impl UnsafeUnpin for PreviousThreadBinding
impl UnwindSafe for PreviousThreadBinding
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