Crate anticipate

Crate anticipate 

Source
Expand description

Control a pseudo-terminal similar to expect(1), fork of expectrl with minimal dependencies and features.

Modules§

log
Types for writing and formatting logs to stdout.
process
Platform independent abstraction over an os process.
repl
REPL manages a session with a known prompt.

Structs§

Any
Any matches uses all provided lookups and returns a match from a first successfull match.
Captures
Captures is a represention of matched pattern.
Eof
Eof consider a match when an EOF is reached.
NBytes
NBytes matches N bytes from the stream.
Regex
Regex tries to look up a match by a regex.
Session
Session represents a spawned process and it’s streams.

Enums§

ControlCode
ControlCode represents the standard ASCII control codes wiki
Error
Error type for the library.
Signal
Types of operating system signals
WaitStatus
Possible return values from wait() or waitpid().

Traits§

Expect
Trait for types that can read and write to child programs.
Needle
Needle an interface for search of a match in a buffer.

Functions§

spawn
Spawn a command.
spawn_with_options
Spawn a session with logger and timeout options.

Type Aliases§

DefaultSession
Session without logging.
OsProcess
OS process which can run a Session and a default one.
OsProcessStream
OS process stream which is a default one for Session.