Skip to main content

DiskWatcherConfig

Struct DiskWatcherConfig 

Source
pub struct DiskWatcherConfig {
    pub recursive_mode: Option<DiskWatcherRecursiveMode>,
    pub poll_interval: Option<Duration>,
    pub report_invalidation_reason: bool,
}

Fields§

§recursive_mode: Option<DiskWatcherRecursiveMode>

Whether to let the [notify::Watcher] recurse into subdirectories itself, or to track and watch each directory we care about ourselves.

None picks a default based on the platform and Self::poll_interval, which is normally what you want.

The TURBO_TASKS_FORCE_WATCH_MODE environment variable will override this configuration value (intended for debugging purposes).

§poll_interval: Option<Duration>

Poll the filesystem at this interval instead of using the platform’s native file watching, for cases where native watching doesn’t work (e.g. some Docker setups). This is slow and inefficient, it should only be used as a last resort.

None disables polling, using the platform’s native watcher ([RecommendedWatcher]) instead of [PollWatcher].

§report_invalidation_reason: bool

Attach an [InvalidationReason] to every invalidation the watcher causes ([WatchStart], [WatchChange], or [InvalidateRescan]), so that it can be reported to the user.

This costs an extra allocation per invalidated path, so it’s only worth enabling when something actually consumes the reasons.

Trait Implementations§

Source§

impl<'__de, __Context> BorrowDecode<'__de, __Context> for DiskWatcherConfig

Source§

fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for DiskWatcherConfig

Source§

fn clone(&self) -> DiskWatcherConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DiskWatcherConfig

Source§

impl Debug for DiskWatcherConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<__Context> Decode<__Context> for DiskWatcherConfig

Source§

fn decode<__D: Decoder<Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl Default for DiskWatcherConfig

Source§

fn default() -> DiskWatcherConfig

Returns the “default value” for a type. Read more
Source§

impl Encode for DiskWatcherConfig

Source§

fn encode<__E: Encoder>(&self, encoder: &mut __E) -> Result<(), EncodeError>

Encode a given type.
Source§

impl Eq for DiskWatcherConfig

Source§

impl Hash for DiskWatcherConfig

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl NonLocalValue for DiskWatcherConfig

Source§

impl PartialEq for DiskWatcherConfig

Source§

fn eq(&self, other: &DiskWatcherConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DiskWatcherConfig

Source§

impl TaskInput for DiskWatcherConfig

Source§

fn is_transient(&self) -> bool

This should return true if this object contains a [Vc] (or any subtype of [Vc]) pointing to a cell owned by a transient task. Read more
§

fn resolve_input(&self) -> impl Future<Output = Result<Self, Error>> + Send

This method should resolve any [Vc]s nested inside of this object, cloning the object in the process. If the input is unresolved ([TaskInput::is_resolved]) a “local” resolution task is created that runs this method.
§

fn is_resolved(&self) -> bool

This should return true if there are any unresolved [Vc]s in the type. Read more
Source§

impl TraceRawVcs for DiskWatcherConfig

Source§

fn trace_raw_vcs(&self, __context__: &mut TraceRawVcsContext)

§

fn get_raw_vcs(&self) -> Vec<RawVc>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> DynEq for T
where T: Any + Eq,

§

impl<T> DynHash for T
where T: Any + Hash,

§

fn dyn_hash(&self, state: &mut dyn Hasher)

§

impl<T> DynPartialEq for T
where T: Any + PartialEq,

§

fn dyn_partial_eq(&self, other: &(dyn Any + 'static)) -> bool

§

impl<T> DynTaskInputs for T
where T: Debug + Eq + Hash + Send + Sync + TraceRawVcs + 'static,

§

fn dyn_type_name(&self) -> &'static str

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> MaybeSendSync for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more