substudy 0.2.0

Tools for working with parallel, bilingual subtitles
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Error-handling for this library.

use std::error;
use std::result;

/// Our library's error class.  We just use a generic error type for
/// everything; it works fine for our needs.
pub type Error = Box<error::Error + Send + Sync>;

/// Our library's result type.
pub type Result<T> = result::Result<T, Error>;

/// Create a new error from something that can be turned into a string.
pub fn err_str<T: Into<String>>(message: T) -> Error {
    From::from(message.into())
}