pub struct FrameSync {
pub force_redraw: Arc<AtomicBool>,
pub pending_acks: Arc<Mutex<Vec<Sender<()>>>>,
}Expand description
Synchronisation surface shared between the actor (which
receives RunStateCmd::FrameAck) and the TUI app (which
honours it). Cloned cheaply; held by both sides.
force_redraw— when set, the TUI app drops its poll timeout to zero so the next iteration draws immediately, bypassingtick_rate. Cleared by the app after the draw.pending_acks—txchannels handed in viaFrameAck. Drained and signalled by the app after eachterminal.draw().
Fields§
§force_redraw: Arc<AtomicBool>§pending_acks: Arc<Mutex<Vec<Sender<()>>>>Implementations§
Source§impl FrameSync
impl FrameSync
Sourcepub fn signal_post_draw(&self)
pub fn signal_post_draw(&self)
Drain every queued ack and signal it. Called by the TUI
app immediately after a successful terminal.draw(). The
force_redraw flag is cleared in the same call so the
app doesn’t busy-spin until the next FrameAck arrives.
Trait Implementations§
Auto Trait Implementations§
impl Forget for FrameSync
impl Freeze for FrameSync
impl Move for FrameSync
impl RefUnwindSafe for FrameSyncwhere
Atomic<usize>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
Mutex<Vec<Sender<()>>>: RefUnwindSafe,
impl Send for FrameSync
impl Sync for FrameSync
impl Unpin for FrameSync
impl UnsafeUnpin for FrameSyncwhere
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*const ArcInner<Mutex<Vec<Sender<()>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Vec<Sender<()>>>>>: UnsafeUnpin,
impl UnwindSafe for FrameSync
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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