pub struct CandidateMailbox { /* private fields */ }Expand description
Bounded non-blocking handoff mailbox decoupling the background UpdateWorker from the UI/render thread.
Implementations§
Source§impl CandidateMailbox
Bounded non-blocking mailbox operations on CandidateMailbox.
impl CandidateMailbox
Bounded non-blocking mailbox operations on CandidateMailbox.
Sourcepub fn push_candidate(&self, candidate: PreparedReleaseCandidate)
pub fn push_candidate(&self, candidate: PreparedReleaseCandidate)
Pushes a prepared candidate into the mailbox, discarding stale releases and coalescing when full.
§Arguments
PreparedReleaseCandidate- Verified, warmed candidate fromUpdateWorker.
Sourcepub fn try_recv_latest(&self) -> Option<PreparedReleaseCandidate>
pub fn try_recv_latest(&self) -> Option<PreparedReleaseCandidate>
Non-blockingly drains the mailbox on the UI thread and returns only the newest prepared candidate.
§Returns
Option<PreparedReleaseCandidate>- Latest ready candidate, orNoneif empty or contended.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Returns the number of candidates currently waiting in the mailbox without blocking.
§Returns
usize- Pending candidate count.
Trait Implementations§
Source§impl Clone for CandidateMailbox
impl Clone for CandidateMailbox
Auto Trait Implementations§
impl Forget for CandidateMailbox
impl Freeze for CandidateMailbox
impl Move for CandidateMailbox
impl RefUnwindSafe for CandidateMailbox
impl Send for CandidateMailbox
impl Sync for CandidateMailbox
impl Unpin for CandidateMailbox
impl UnsafeUnpin for CandidateMailboxwhere
*const ArcInner<Mutex<CandidateMailboxInner>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<CandidateMailboxInner>>>: UnsafeUnpin,
impl UnwindSafe for CandidateMailbox
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