pub struct ptycmd {
pub name: String,
pub args: Vec<String>,
pub master_fd: RawFd,
pub pid: i32,
pub echo: bool,
pub nonblock: bool,
pub finished: bool,
pub read_buf: Option<u8>,
pub old: Option<Vec<u8>>,
}Expand description
A pseudo-terminal command session.
Port of struct ptycmd from Src/Modules/zpty.c — the C
source threads it through getptycmd() (line 153),
newptycmd() (line 310), deleteptycmd() (line 490) etc.
Same fields (name, args, master fd, pid, echo, nonblock).
Fields§
§name: Stringname field (C: char *name).
args: Vec<String>args field (C: char **args).
master_fd: RawFdmaster_fd field (C: int fd — master end of the pty).
pid: i32pid field (C: pid_t pid — spawned child PID).
echo: boolecho field (C: int echo).
nonblock: boolnonblock field (C: int nblock).
finished: boolfinished field (C: int fin).
read_buf: Option<u8>read_buf field — C: int read; initialised to -1; the
single byte stashed by checkptycmd (c:543-544) for the next
ptyread to consume at c:583-588. None ⇔ C’s -1 sentinel.
old: Option<Vec<u8>>old field — C: char *old; int olen; populated when a
pattern-bearing ptyread exits early with EWOULDBLOCK/EAGAIN
(c:682-694) so the partial-match prefix carries to the next
invocation (c:572-578).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ptycmd
impl RefUnwindSafe for ptycmd
impl Send for ptycmd
impl Sync for ptycmd
impl Unpin for ptycmd
impl UnsafeUnpin for ptycmd
impl UnwindSafe for ptycmd
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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