aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/error.rs
diff options
context:
space:
mode:
authorBrian Vincent <[email protected]>2017-11-06 23:18:31 -0600
committerBrian Vincent <[email protected]>2017-11-06 23:18:31 -0600
commit4a6fe97f9cf907ddc773687c815eee681a6f6513 (patch)
treeeaba3019acc1ea4d84dd71b42ac38380b9202063 /openssl/src/error.rs
parentAdd an example of making a CA and certs and verifying. (diff)
parentAdd an example of making a CA and certs and verifying. (diff)
downloadrust-openssl-4a6fe97f9cf907ddc773687c815eee681a6f6513.tar.xz
rust-openssl-4a6fe97f9cf907ddc773687c815eee681a6f6513.zip
Merge branch 'my-temp-work'
Diffstat (limited to 'openssl/src/error.rs')
-rw-r--r--openssl/src/error.rs20
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>);