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]
&mut self,
generated_filename: P
) -> &mut Self
Sets the generated filename.
pub fn with_generated_fn<S>(&mut self, generated_fn: S) -> &mut Self where
S: Into<String>, [src]
S: Into<String>,
Sets the generated function name.
pub fn with_module_name<S>(&mut self, module_name: S) -> &mut Self where
S: Into<String>, [src]
S: Into<String>,
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]
fn default() -> ResourceDir[src]
impl From<NpmBuild> for ResourceDir[src]
Auto Trait Implementations
impl RefUnwindSafe for ResourceDir
impl Send for ResourceDir
impl Sync for ResourceDir
impl Unpin for ResourceDir
impl UnwindSafe for ResourceDir
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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.
pub 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>,