Trait reproto::output::Output
[−]
[src]
pub trait Output { fn lock<'a>(&'a self) -> Box<Write + 'a>; fn logger(&self) -> Box<Log + 'static>; fn print(&self, m: &str) -> Result<()>; fn print_info(&self, m: &str, p: &ErrorPos) -> Result<()>; fn print_error(&self, m: &str, p: &ErrorPos) -> Result<()>; fn handle_context(&self, ctx: &Context) -> Result<()> { ... } fn handle_error(&self, e: &Error) -> Result<()> { ... } fn error(&self, e: &Error) -> Result<()> { ... } fn error_message(&self, m: &str) -> Result<String> { ... } }
Required Methods
fn lock<'a>(&'a self) -> Box<Write + 'a>
fn logger(&self) -> Box<Log + 'static>
fn print(&self, m: &str) -> Result<()>
fn print_info(&self, m: &str, p: &ErrorPos) -> Result<()>
fn print_error(&self, m: &str, p: &ErrorPos) -> Result<()>
Provided Methods
fn handle_context(&self, ctx: &Context) -> Result<()>
fn handle_error(&self, e: &Error) -> Result<()>
Handle any errors.
fn error(&self, e: &Error) -> Result<()>
fn error_message(&self, m: &str) -> Result<String>
Implementors
impl<T> Output for Colored<T> where
T: 'static + LockableWrite,impl<T> Output for NonColored<T> where
T: 'static + LockableWrite,