[−][src]Struct rocket_seek_stream::SeekStream
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]
T: Read + Seek + 'a,
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]
stream: T,
stream_len: impl Into<Option<u64>>,
content_type: impl Into<Option<&'a str>>
) -> SeekStream<'a> where
T: Read + Seek + 'a,
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]
fn respond_to(self, req: &Request) -> Result<'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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,