Struct change_detection::ChangeDetectionBuilder [−][src]
pub struct ChangeDetectionBuilder { /* fields omitted */ }
A change detection builder.
A builder to generate change detection instructions.
You should not use this directly, use ChangeDetection
as an entry point instead.
Implementations
impl ChangeDetectionBuilder
[src]
pub fn path<P>(self, path: P) -> ChangeDetectionBuilder where
P: Into<ChangeDetectionPath>,
[src]
P: Into<ChangeDetectionPath>,
Collects change detection instructions from a path
.
A path
can be a single file or a directory.
Examples:
To generate change instructions for the directory with the name static
:
builder.path("static").generate();
To generate change instructions for the file with the name build.rs
:
builder.path("build.rs").generate();
pub fn path_include<P, F>(self, path: P, filter: F) -> ChangeDetectionBuilder where
P: AsRef<Path>,
F: PathMatcher + 'static,
[src]
P: AsRef<Path>,
F: PathMatcher + 'static,
Collects change detection instructions from a path
applying include filter
.
A path
can be a single file or a directory.
Examples:
To generate change instructions for the directory with the name static
but only for files ending with b
:
builder.path_include("static", |path: &std::path::Path| { path.file_name() .map(|filename| filename.to_str().unwrap().ends_with("b")) .unwrap_or(false) }).generate();
pub fn path_exclude<P, F>(self, path: P, filter: F) -> ChangeDetectionBuilder where
P: AsRef<Path>,
F: PathMatcher + 'static,
[src]
P: AsRef<Path>,
F: PathMatcher + 'static,
Collects change detection instructions from a path
applying exclude filter
.
A path
can be a single file or a directory.
Examples:
To generate change instructions for the directory with the name static
but without files ending with b
:
builder.path_exclude("static", |path: &std::path::Path| { path.file_name() .map(|filename| filename.to_str().unwrap().ends_with("b")) .unwrap_or(false) }).generate();
pub fn path_filter<P, F1, F2>(
self,
path: P,
include: F1,
exclude: F2
) -> ChangeDetectionBuilder where
P: AsRef<Path>,
F1: PathMatcher + 'static,
F2: PathMatcher + 'static,
[src]
self,
path: P,
include: F1,
exclude: F2
) -> ChangeDetectionBuilder where
P: AsRef<Path>,
F1: PathMatcher + 'static,
F2: PathMatcher + 'static,
Collects change detection instructions from a path
applying include
and exclude
filters.
A path
can be a single file or a directory.
Examples:
To generate change instructions for the directory with the name static
including only files starting with a
but without files ending with b
:
builder.path_filter("static", |path: &std::path::Path| { path.file_name() .map(|filename| filename.to_str().unwrap().starts_with("a")) .unwrap_or(false) }, |path: &std::path::Path| { path.file_name() .map(|filename| filename.to_str().unwrap().ends_with("b")) .unwrap_or(false) }).generate();
pub fn generate(self)
[src]
Trait Implementations
impl Default for ChangeDetectionBuilder
[src]
fn default() -> ChangeDetectionBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ChangeDetectionBuilder
impl !Send for ChangeDetectionBuilder
impl !Sync for ChangeDetectionBuilder
impl Unpin for ChangeDetectionBuilder
impl !UnwindSafe for ChangeDetectionBuilder
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>,