[][src]Struct rocket_seek_stream::SeekStream

pub struct SeekStream<'a> { /* fields omitted */ }

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.

The Accept Ranges header will always be set. If a range request is received, it will respond with the requested offset. Multipart range requests are also supported.

Methods

impl<'a> SeekStream<'a>[src]

pub fn new<T>(s: T) -> SeekStream<'a> where
    T: Read + Seek + 'a, 
[src]

pub fn with_opts<T>(
    stream: T,
    stream_len: impl Into<Option<u64>>,
    content_type: impl Into<Option<&'a str>>
) -> SeekStream<'a> where
    T: Read + Seek + 'a, 
[src]

pub fn from_path<T: AsRef<Path>>(p: T) -> Result<Self>[src]

Serve content from a file path. The mime type will be inferred by taking a sample from The beginning of the stream.

Trait Implementations

impl<'a> Responder<'a> for SeekStream<'a>[src]

Auto Trait Implementations

impl<'a> Unpin for SeekStream<'a>

impl<'a> !Sync for SeekStream<'a>

impl<'a> !Send for SeekStream<'a>

impl<'a> !UnwindSafe for SeekStream<'a>

impl<'a> !RefUnwindSafe for SeekStream<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Typeable for T where
    T: Any

impl<T> IntoCollection<T> for T

impl<T, I> AsResult<T, I> for T where
    I: Input, 

impl<T> Erased for T