webmetro/src/lib.rs

38 lines
780 B
Rust
Raw Normal View History

2017-01-10 03:40:21 +00:00
2017-07-10 23:36:20 +00:00
extern crate bytes;
2017-01-10 03:40:21 +00:00
extern crate futures;
extern crate odds;
extern crate tokio;
2017-01-10 03:40:21 +00:00
2017-06-27 06:11:29 +00:00
pub mod ebml;
2018-04-13 23:01:40 +00:00
pub mod error;
2018-04-05 00:26:02 +00:00
pub mod iterator;
2018-04-04 04:43:25 +00:00
pub mod slice;
pub mod stream_parser;
2018-04-04 04:43:25 +00:00
2018-04-05 00:26:02 +00:00
pub mod chunk;
pub mod fixers;
2017-06-27 06:11:29 +00:00
pub mod webm;
2017-01-12 05:41:35 +00:00
pub mod channel;
2018-12-22 20:03:19 +00:00
pub use crate::ebml::{EbmlError, FromEbml};
2017-01-24 08:20:49 +00:00
2017-01-10 03:40:21 +00:00
#[cfg(test)]
mod tests {
use futures::future::{ok, Future};
2017-06-28 05:54:30 +00:00
pub const TEST_FILE: &'static [u8] = include_bytes!("data/test1.webm");
2018-04-12 02:45:53 +00:00
pub const ENCODE_WEBM_TEST_FILE: &'static [u8] = include_bytes!("data/encode_webm_test.webm");
2017-01-10 03:40:21 +00:00
#[test]
fn hello_futures() {
let my_future = ok::<String, ()>("Hello".into())
.map(|hello| hello + ", Futures!");
let string_result = my_future.wait().unwrap();
assert_eq!(string_result, "Hello, Futures!");
}
}