diff options
| author | Steven Fackler <[email protected]> | 2017-11-05 10:24:59 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-11-05 10:24:59 -0800 |
| commit | 6bb54e01715b7ca4cc016123b249d762234da58a (patch) | |
| tree | e497c5a0ca79149c7dc94c94faa647aabe9ec37a /openssl/src | |
| parent | Merge pull request #769 from sfackler/want-read (diff) | |
| parent | fixed broken example and syntax error in module level documentation (diff) | |
| download | rust-openssl-6bb54e01715b7ca4cc016123b249d762234da58a.tar.xz rust-openssl-6bb54e01715b7ca4cc016123b249d762234da58a.zip | |
Merge pull request #764 from AndyGauge/doc-error
Doc error
Diffstat (limited to 'openssl/src')
| -rw-r--r-- | openssl/src/error.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openssl/src/error.rs b/openssl/src/error.rs index 9151c01b..5f3e2170 100644 --- a/openssl/src/error.rs +++ b/openssl/src/error.rs @@ -1,3 +1,20 @@ +//! Errors returned by OpenSSL library. +//! +//! OpenSSL errors are stored in an `ErrorStack`. Most methods in the crate +//! returns a `Result<T, ErrorStack>` type. +//! +//! # Examples +//! +//! ``` +//! use openssl::error::ErrorStack; +//! use openssl::bn::BigNum; +//! +//! let an_error = BigNum::from_dec_str("Cannot parse letters"); +//! match an_error { +//! Ok(_) => (), +//! Err(e) => println!("Parsing Error: {:?}", e), +//! } +//! ``` use libc::{c_ulong, c_char, c_int}; use std::fmt; use std::error; @@ -9,6 +26,9 @@ use std::borrow::Cow; use ffi; +/// Collection of [`Error`]s from OpenSSL. +/// +/// [`Error`]: struct.Error.html #[derive(Debug, Clone)] pub struct ErrorStack(Vec<Error>); |