use std::time::Duration;
use crate::terminal::error::SessionError;
pub trait Session: Send {
fn send_text(&mut self, text: &str) -> Result<(), SessionError>;
fn send_line(&mut self, text: &str) -> Result<(), SessionError>;
fn press(&mut self, key: &str) -> Result<(), SessionError>;
fn wait_for_text(&mut self, text: &str, timeout: Duration) -> Result<bool, SessionError>;
fn wait_for_idle(&mut self, stable: Duration, timeout: Duration) -> Result<bool, SessionError>;
fn wait_for_exit(&mut self, timeout: Duration) -> Result<Option<i32>, SessionError>;
fn read_available(&mut self, timeout: Duration) -> Result<(), SessionError>;
fn is_alive(&mut self) -> bool;
fn close(&mut self) -> Result<(), SessionError>;
fn screen(&self) -> &str;
fn raw_output(&self) -> &str;
fn screen_attributed(&mut self) -> Option<crate::terminal::attributed::AttributedScreen> {
None
}
fn exit_code(&self) -> Option<i32>;
fn cols(&self) -> u16;
fn rows(&self) -> u16;
fn argv(&self) -> &[String];
fn cast_path(&self) -> &std::path::Path;
}