[][src]Struct actix_web_static_files::ResourceFiles

pub struct ResourceFiles { /* fields omitted */ }

Static resource files handling

ResourceFiles service must be registered with App::service method.

use std::collections::HashMap;

use actix_web::App;

fn main() {
    let files: HashMap<&'static str, actix_web_static_files::Resource> = HashMap::new();
    let app = App::new()
        .service(actix_web_static_files::ResourceFiles::new(".", files));
}

Methods

impl ResourceFiles[src]

pub fn new(path: &str, files: HashMap<&'static str, Resource>) -> Self[src]

Trait Implementations

impl Deref for ResourceFiles[src]

type Target = ResourceFilesInner

The resulting type after dereferencing.

impl NewService for ResourceFiles[src]

type Config = ()

Service factory configuration

type Request = ServiceRequest

Requests handled by the service.

type Response = ServiceResponse

Responses given by the service

type Error = Error

Errors produced by the service

type Service = ResourceFilesService

The Service value created by this factory

type InitError = ()

Errors produced while building a service.

type Future = Box<dyn Future<Item = Self::Service, Error = Self::InitError>>

The future of the Service instance.

impl HttpServiceFactory for ResourceFiles[src]

Auto Trait Implementations

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 = !

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> IntoNewService<T> for T where
    T: NewService
[src]

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