pub struct ReviewState { /* private fields */ }Expand description
D-fix.6 follow-up: shared pending-review counter, mode-owned. claude-code
produces every openDiff and awaits its outcome (diff::open_diff), so
the span from request-sent to outcome-resolved IS a pending review — no host
signal needed. begin() (called by open_diff around its await) bumps
the count + wakes the status publisher; the returned ReviewGuard
decrements + wakes on Drop, so the count is correct even if the connection
drops or the task is cancelled mid-review.
Implementations§
Source§impl ReviewState
impl ReviewState
Sourcepub fn new(changed: Arc<Notify>) -> ReviewHandle
pub fn new(changed: Arc<Notify>) -> ReviewHandle
Build a tracker whose mutations wake changed (the status publisher’s
wake), so a pending-review badge appears/clears off-keystroke.
Sourcepub fn count_handle(&self) -> Arc<AtomicUsize> ⓘ
pub fn count_handle(&self) -> Arc<AtomicUsize> ⓘ
The shared count cell the status publisher reads each wake.
Sourcepub fn begin(&self) -> ReviewGuard
pub fn begin(&self) -> ReviewGuard
Mark one review pending until the returned guard drops.
Auto Trait Implementations§
impl Freeze for ReviewState
impl RefUnwindSafe for ReviewState
impl Send for ReviewState
impl Sync for ReviewState
impl Unpin for ReviewState
impl UnsafeUnpin for ReviewState
impl UnwindSafe for ReviewState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.