Struct static_files::ResourceDir[][src]

pub struct ResourceDir { /* fields omitted */ }

Resource dir.

A builder structure allows to change default settings for:

  • file filter
  • generated file name
  • generated function name

Implementations

impl ResourceDir[src]

pub fn build(self) -> Result<()>[src]

Generates resources for current configuration.

pub fn with_filter(&mut self, filter: fn(p: &Path) -> bool) -> &mut Self[src]

Sets the file filter.

pub fn with_generated_filename<P: AsRef<Path>>(
    &mut self,
    generated_filename: P
) -> &mut Self
[src]

Sets the generated filename.

pub fn with_generated_fn<S>(&mut self, generated_fn: S) -> &mut Self where
    S: Into<String>, 
[src]

Sets the generated function name.

pub fn with_module_name<S>(&mut self, module_name: S) -> &mut Self where
    S: Into<String>, 
[src]

Sets the generated module name.

Default value is based on generated function name and the suffix “sets”. Generated module would be overriden by each call.

pub fn with_count_per_module(&mut self, count_per_module: usize) -> &mut Self[src]

Sets maximal count of files per module.

Trait Implementations

impl Default for ResourceDir[src]

impl From<NpmBuild> for ResourceDir[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.