Struct ssh2::Error
[−]
[src]
pub struct Error { /* fields omitted */ }
Representation of an error that can occur within libssh2
Methods
impl Error
[src]
pub fn last_error(sess: &Session) -> Option<Error>
[src]
Generate the last error that occurred for a Session
.
Returns None
if there was no last error.
pub fn new(code: c_int, msg: &'static str) -> Error
[src]
Create a new error for the given code and message
pub fn eof() -> Error
[src]
Generate an error that represents EOF
pub fn unknown() -> Error
[src]
Generate an error for unknown failure
pub fn from_errno(code: c_int) -> Error
[src]
Construct an error from an error code from libssh2
pub fn message(&self) -> &str
[src]
Get the message corresponding to this error
pub fn code(&self) -> c_int
[src]
Return the code for this error
Trait Implementations
impl Debug for Error
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Error for Error
[src]
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
The lower-level cause of this error, if any. Read more