Trait LastError

Source
pub trait LastError {
    // Required method
    fn last_error(&self) -> Result<String>;

    // Provided method
    fn to_error<T>(errstr: String) -> Result<T> { ... }
}
Expand description

Returns the last API error.

The Tls and Config structs both provide a way to return the last error as a String from the underlying API.

Required Methods§

Source

fn last_error(&self) -> Result<String>

Return the last error of the underlying API.

The last_error method returns an error if no error occurred at all, or if memory allocation failed while trying to assemble the string describing the most recent error related to config.

Provided Methods§

Source

fn to_error<T>(errstr: String) -> Result<T>

Returns the error string as an error object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§