1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#![feature(seek_convenience)]

//! This crate provides a seekable stream responder for rocket that will satisfy range requests.
//!
//! # Examples
//! see the examples directory for more.
//! 
//! ```no_run
//! #![feature(proc_macro_hygiene, decl_macro)]
//! #[macro_use]
//! extern crate rocket;
//! use rocket_seek_stream::SeekStream;
//!
//! #[get("/")]
//! fn home<'a>() -> std::io::Result<SeekStream<'a>> {
//!     SeekStream::from_path("kosmodrom.webm")
//! }
//! 
//! fn main() {
//!     rocket::Rocket::custom(
//!         rocket::Config::build(rocket::config::Environment::Development)
//!             .address("localhost")
//!             .port(8000)
//!             .finalize()
//!             .unwrap(),
//!     )
//!     .mount("/", routes![home])
//!    .launch();
//! }
//!
//! ```

mod multipart;
mod seekstream;

pub use seekstream::{ReadSeek, SeekStream};