[][src]Enum watchman_client::SubscriptionData

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>, }, }

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

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.

Fields of StateEnter

state_name: Stringmetadata: Option<Value>
StateLeave

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.

Fields of StateLeave

state_name: Stringmetadata: Option<Value>

Trait Implementations

impl<F: Clone> Clone for SubscriptionData<F> where
    F: DeserializeOwned + Debug + Clone + QueryFieldList, 
[src]

impl<F: Debug> Debug for SubscriptionData<F> where
    F: DeserializeOwned + Debug + Clone + QueryFieldList, 
[src]

Auto Trait Implementations

impl<F> RefUnwindSafe for SubscriptionData<F> where
    F: RefUnwindSafe
[src]

impl<F> Send for SubscriptionData<F> where
    F: Send
[src]

impl<F> Sync for SubscriptionData<F> where
    F: Sync
[src]

impl<F> Unpin for SubscriptionData<F> where
    F: Unpin
[src]

impl<F> UnwindSafe for SubscriptionData<F> where
    F: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.