pub enum NpmCacheSetting {
Only,
ReloadAll,
ReloadSome {
npm_package_names: Vec<String>,
},
Use,
}
Expand description
Indicates how cached source files should be handled.
Variants§
Only
Only the cached files should be used. Any files not in the cache will
error. This is the equivalent of --cached-only
in the CLI.
ReloadAll
No cached source files should be used, and all files should be reloaded.
This is the equivalent of --reload
in the CLI.
ReloadSome
Only some cached resources should be used. This is the equivalent of
--reload=npm:chalk
Use
The cached source files should be used for local modules. This is the default behavior of the CLI.
Implementations§
Source§impl NpmCacheSetting
impl NpmCacheSetting
pub fn from_cache_setting(cache_setting: &CacheSetting) -> NpmCacheSetting
pub fn should_use_for_npm_package(&self, package_name: &str) -> bool
Trait Implementations§
Source§impl Clone for NpmCacheSetting
impl Clone for NpmCacheSetting
Source§fn clone(&self) -> NpmCacheSetting
fn clone(&self) -> NpmCacheSetting
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 NpmCacheSetting
impl Debug for NpmCacheSetting
Source§impl PartialEq for NpmCacheSetting
impl PartialEq for NpmCacheSetting
impl Eq for NpmCacheSetting
impl StructuralPartialEq for NpmCacheSetting
Auto Trait Implementations§
impl Freeze for NpmCacheSetting
impl RefUnwindSafe for NpmCacheSetting
impl Send for NpmCacheSetting
impl Sync for NpmCacheSetting
impl Unpin for NpmCacheSetting
impl UnwindSafe for NpmCacheSetting
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.