pub struct Lent<'a> { /* private fields */ }Expand description
Guard for a message hashed in place on loan (Pipeline::lent).
Hold this guard until its message’s event has been taken. Dropped while a worker may still read the bytes (before the message is hashed), it stops the process: no worker reads freed memory.
§Trait implementations
Dropstops the process (an abort, not a panic) while the loan’s hashing has not finished, even where no worker has been given it yet or its Pipeline is gone; once it has finished, the guard may be dropped before its event is taken. The guard reads a monotonic count of its slot’s finished work: after its Pipeline was dropped with the loan still not handed to a worker, and a later Pipeline has reused the same slot, the drop may pass though the loan was never hashed, and no worker reads its bytes then either.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Lent<'a>
impl<'a> RefUnwindSafe for Lent<'a>
impl<'a> Send for Lent<'a>
impl<'a> Sync for Lent<'a>
impl<'a> Unpin for Lent<'a>
impl<'a> UnsafeUnpin for Lent<'a>
impl<'a> UnwindSafe for Lent<'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
Mutably borrows from an owned value. Read more