Struct ssh2::Error [−][src]
pub struct Error { /* fields omitted */ }Representation of an error that can occur within libssh2
Methods
impl Error[src]
impl Errorpub fn last_error(sess: &Session) -> Option<Error>[src]
pub fn last_error(sess: &Session) -> Option<Error>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]
pub fn new(code: c_int, msg: &'static str) -> ErrorCreate a new error for the given code and message
pub fn eof() -> Error[src]
pub fn eof() -> ErrorGenerate an error that represents EOF
pub fn unknown() -> Error[src]
pub fn unknown() -> ErrorGenerate an error for unknown failure
pub fn from_errno(code: c_int) -> Error[src]
pub fn from_errno(code: c_int) -> ErrorConstruct an error from an error code from libssh2
pub fn message(&self) -> &str[src]
pub fn message(&self) -> &strGet the message corresponding to this error
pub fn code(&self) -> c_int[src]
pub fn code(&self) -> c_intReturn the code for this error
Trait Implementations
impl Debug for Error[src]
impl Debug for Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Display for Error[src]
impl Display for Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Error for Error[src]
impl Error for Errorfn description(&self) -> &str[src]
fn description(&self) -> &strThis method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>1.0.0[src]
fn cause(&self) -> Option<&Error>1.0.0
[src]The lower-level cause of this error, if any. Read more
impl From<NulError> for Error[src]
impl From<NulError> for Error