Struct tk_sendfile::DiskPool
[−]
[src]
pub struct DiskPool { /* fields omitted */ }
A reference to a thread pool for disk operations
Methods
impl DiskPool
[src]
fn new(pool: CpuPool) -> DiskPool
Create a disk pool that sends its tasks into the CpuPool
fn open<F>(&self, file: F) -> BoxFuture<Sendfile<F::Opener>, Error> where
F: IntoFileOpener + Send + Sized + 'static,
F: IntoFileOpener + Send + Sized + 'static,
Start a file send operation
fn send<F, D>(&self, file: F, destination: D) -> BoxFuture<D, Error> where
F: IntoFileOpener + Send + Sized + 'static,
D: Destination + Send + Sized + 'static,
F: IntoFileOpener + Send + Sized + 'static,
D: Destination + Send + Sized + 'static,
A shortcut method to send whole file without headers
Trait Implementations
impl Clone for DiskPool
[src]
fn clone(&self) -> DiskPool
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more