pub enum SubscriptionData<F> where
    F: DeserializeOwned + Debug + Clone + QueryFieldList, 
{ Canceled, FilesChanged(QueryResult<F>), StateEnter { state_name: String, metadata: Option<Value>, }, StateLeave { state_name: String, metadata: Option<Value>, }, }
Expand description

Returned by Subscription::next as events are observed by Watchman.

Variants

Canceled

The Subscription was canceled. This could be for a number of reasons that are not knowable to the client:

  • The user may have issued the watch-del command
  • The containing watch root may have been deleted or un-mounted
  • The containing watch may no longer be accessible to the watchman user/process
  • Some other error condition that renders the project unwatchable may have occurred
  • The server may have been gracefully shutdown

A Canceled subscription will deliver no further results.

FilesChanged(QueryResult<F>)

Files matching your criteria have changed. The QueryResult contains the details. Pay attention to the is_fresh_instance field!

StateEnter

Fields

state_name: String
metadata: Option<Value>

Some other watchman client has broadcast that the watched project is entering a new named state. For example, hg.update may be generated by the FB internal source control system to indicate that the working copy is about to be updated to a new revision. The metadata field contains data specific to the named state.

StateLeave

Fields

state_name: String
metadata: Option<Value>

Some other watchman client has broadcast that the watched project is no longer in the named state. This event can also be generated if the watchman client that entered the state disconnects unexpectedly from the watchman server. The metadata field will be None in that situation.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.