pub struct ResourceDir { /* private fields */ }
Expand description
Resource dir.
A builder structure allows to change default settings for:
- file filter
- generated file name
- generated function name
Implementations§
Source§impl ResourceDir
impl ResourceDir
Sourcepub fn with_filter(&mut self, filter: fn(p: &Path) -> bool) -> &mut Self
pub fn with_filter(&mut self, filter: fn(p: &Path) -> bool) -> &mut Self
Sets the file filter.
Sourcepub fn with_generated_filename<P: AsRef<Path>>(
&mut self,
generated_filename: P,
) -> &mut Self
pub fn with_generated_filename<P: AsRef<Path>>( &mut self, generated_filename: P, ) -> &mut Self
Sets the generated filename.
Sourcepub fn with_generated_fn<S>(&mut self, generated_fn: S) -> &mut Self
pub fn with_generated_fn<S>(&mut self, generated_fn: S) -> &mut Self
Sets the generated function name.
Sourcepub fn with_module_name<S>(&mut self, module_name: S) -> &mut Self
pub fn with_module_name<S>(&mut self, module_name: S) -> &mut Self
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.
Sourcepub fn with_count_per_module(&mut self, count_per_module: usize) -> &mut Self
pub fn with_count_per_module(&mut self, count_per_module: usize) -> &mut Self
Sets maximal count of files per module.
Trait Implementations§
Source§impl Default for ResourceDir
impl Default for ResourceDir
Source§fn default() -> ResourceDir
fn default() -> ResourceDir
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResourceDir
impl RefUnwindSafe for ResourceDir
impl Send for ResourceDir
impl Sync for ResourceDir
impl Unpin for ResourceDir
impl UnwindSafe for ResourceDir
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more