Expand description

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

Examples

see the examples directory for more.

use rocket::{get, launch, routes};
use rocket_seek_stream::SeekStream;

#[get("/")]
fn home<'a>() -> std::io::Result<SeekStream<'a>> {
    SeekStream::from_path("kosmodrom.webm")
}

#[launch]
fn rocket() -> _ {
    rocket::Rocket::build()
        .mount("/", routes![home])
}

Structs

  • Serves a readable and seekable stream, The mime type can optionally be inferred by taking a sample of bytes from the beginning of the stream.

Traits

  • Alias trait for AsyncRead + AsyncSeek + Send