Enum ReadWriteResult
enum ReadWriteResult {
Success {
remainder: Vec<u8>,
key_event_records: Vec<KEY_EVENT_RECORD>,
},
WouldBlock,
Err,
Disconnect,
}Expand description
Possible results when reading from the named pipe and writing to the current process’s stdinput.
Variants§
Success
We wrote all complete [INPUT_RECORD_0] sequences we read from the named pipe to stdin.
Fields
§
remainder: Vec<u8>Incomplete [INPUT_RECORD_0] sequence.
What we read from the named pipe is a serialized [INPUT_RECORD_0].KeyEvent.
As this is simply a SERIALIZED_INPUT_RECORD_0_LENGTH byte long sequence and we try to read from the pipe until we
have some of the data it can happen that during any one read/write iteration we don’t
read the full sequence so we must keep track of what we read for next iterations
where we will be able to read the remainder of the sequence.
WouldBlock
Trying to read from the pipe would require us to wait for data.
Err
Something went wrong.
Disconnect
The pipe was closed.
Auto Trait Implementations§
impl Freeze for ReadWriteResult
impl RefUnwindSafe for ReadWriteResult
impl Send for ReadWriteResult
impl Sync for ReadWriteResult
impl Unpin for ReadWriteResult
impl UnwindSafe for ReadWriteResult
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