Module expectrl::session

source ·
Expand description

This module contains a system independent Session representation.

But it does set a default Session<P, S> processes and stream in order to be able to use Session without generics. It also sets a list of other methods which are available for a platform processes.

Example

use std::{process::Command, io::prelude::*};
use expectrl::Session;

let mut p = Session::spawn(Command::new("cat")).unwrap();
writeln!(p, "Hello World").unwrap();
let mut line = String::new();
p.read_line(&mut line).unwrap();

Structs

  • Session represents a spawned process and its streams. It controlls process and communication with it.

Functions

  • Set a logger which will write each Read/Write operation into the writter.

Type Definitions