pub enum BuildPattern {
Lazy,
RealTime,
Custom {
if_path_changed: Vec<String>,
if_env_changed: Vec<String>,
},
}
Expand description
The BuildPattern enum defines strategies for triggering package rebuilding.
Default mode is Lazy
.
Lazy
: The lazy mode. In this mode, if the current Rust environment is set todebug
, the rebuild package will not run every time the build script is triggered. If the environment is set torelease
, it behaves the same as theRealTime
mode.RealTime
: The real-time mode. It will always trigger rebuilding a package upon any change, regardless of whether the Rust environment is set todebug
orrelease
.Custom
: The custom build mode, an enhanced version ofRealTime
mode, allowing for user-defined conditions to trigger rebuilding a package.
Variants§
Lazy
RealTime
Custom
Fields
§
if_path_changed: Vec<String>
A list of paths that, if changed, will trigger a rebuild. See https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed
§
if_env_changed: Vec<String>
A list of environment variables that, if changed, will trigger a rebuild. See https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-env-changed
Trait Implementations§
Source§impl Clone for BuildPattern
impl Clone for BuildPattern
Source§fn clone(&self) -> BuildPattern
fn clone(&self) -> BuildPattern
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BuildPattern
impl Debug for BuildPattern
Source§impl Default for BuildPattern
impl Default for BuildPattern
Source§fn default() -> BuildPattern
fn default() -> BuildPattern
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BuildPattern
impl RefUnwindSafe for BuildPattern
impl Send for BuildPattern
impl Sync for BuildPattern
impl Unpin for BuildPattern
impl UnwindSafe for BuildPattern
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