rocket_seek_stream 0.2.1

Rocket-rs responder to range requests using types that implement Read + Seek
Documentation

This crate provides a seekable stream responder for rocket that will satisfy range requests.

Examples

see the examples directory for more.

#![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();
}