commit
6bb54e0171
|
|
@ -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 libc::{c_ulong, c_char, c_int};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::error;
|
use std::error;
|
||||||
|
|
@ -9,6 +26,9 @@ use std::borrow::Cow;
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
|
|
||||||
|
/// Collection of [`Error`]s from OpenSSL.
|
||||||
|
///
|
||||||
|
/// [`Error`]: struct.Error.html
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct ErrorStack(Vec<Error>);
|
pub struct ErrorStack(Vec<Error>);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue