pub enum ReaderCommand {
Pause,
Resume,
Shutdown,
}Expand description
Lifecycle commands for the reader thread. Sent from the event loop
whenever an external process (OAuth browser flow, /shell, etc.)
needs stdin/stdout in cooked mode without our reader racing for bytes.
Variants§
Pause
Stop calling event::poll / event::read. The reader blocks on
its command channel until Resume arrives. Sends a single () on
ack once it’s confirmed idle, so the caller can safely take
over stdin without a race.
Resume
Resume normal event dispatch. No ack — the next keystroke is the ack.
Shutdown
Exit the thread. Idempotent; dropping the sender also triggers exit.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReaderCommand
impl RefUnwindSafe for ReaderCommand
impl Send for ReaderCommand
impl Sync for ReaderCommand
impl Unpin for ReaderCommand
impl UnsafeUnpin for ReaderCommand
impl UnwindSafe for ReaderCommand
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
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