Trait tcl::interp::CodeToResult
source · pub trait CodeToResult{
// Provided methods
fn code_to_result(self, interp: &Interp) -> Result<(), InterpError> { ... }
fn unit_result(self) -> Result<(), ()> { ... }
fn is_ok(self) -> bool { ... }
}
Expand description
Converts integral error code returned by Tcl’s C API to Rust’s Result
type.
Provided Methods§
sourcefn code_to_result(self, interp: &Interp) -> Result<(), InterpError>
fn code_to_result(self, interp: &Interp) -> Result<(), InterpError>
Converts TCL_ERROR
to Err(InterpError)
, which stores returned Tcl Obj
and options.
sourcefn unit_result(self) -> Result<(), ()>
fn unit_result(self) -> Result<(), ()>
Converts TCL_OK
to Ok(())
, otherwise Err(())
.
Object Safety§
This trait is not object safe.