[][src]Struct watchman_client::pdu::SubscribeRequest

pub struct SubscribeRequest {
    pub since: Option<Clock>,
    pub relative_root: Option<PathBuf>,
    pub expression: Option<Expr>,
    pub fields: Vec<&'static str>,
    pub empty_on_fresh_instance: bool,
    pub case_sensitive: bool,
    pub defer_vcs: bool,
    pub defer: Vec<&'static str>,
    pub drop: Vec<&'static str>,
}

Fields

since: Option<Clock>

If set, enables the use of the since generator and specifies the last time you queried the server and for which you wish to receive a delta of changes. You will typically thread the QueryResult.clock field back to a subsequent since query to process the continuity of matching file changes. https://facebook.github.io/watchman/docs/file-query.html#since-generator

relative_root: Option<PathBuf>

if set, indicates that all input paths are relative to this subdirectory in the project, and that all returned filenames will also be relative to this subdirectory. In large virtualized filesystems it is undesirable to leave this set to None as it makes it more likely that you will trigger an O(project) filesystem walk. This field is set automatically from the ResolvedRoot when you perform queries using Client::query.

expression: Option<Expr>

If set, specifies the expression to use to filter the candidate matches produced by the selected query generator. Each candidate is visited in turn and has the expression applied. Candidates for which the expression evaluates as true will be included in the returned list of files. If left unspecified, the server will assume Expr::True.

fields: Vec<&'static str>

Specifies the list of fields names returned by the server. The name field should be considered a required field and is the cheapest field to return. Depending on the watcher implementation, other metadata has varying cost. In general, avoid querying size and mode fields and instead prefer to query content.sha1hex and type instead to avoid materializing inodes in a virtualized filesystem.

empty_on_fresh_instance: bool

If true you indicate that you know how to 100% correctly deal with a fresh instance result set. It is strongly recommended that you leave this option alone as it is a common source of cache invalidation and divergence issues for clients.

case_sensitive: bool

If true, treat filenames as case sensitive even on filesystems that otherwise appear to be case insensitive. This can improve performance of directory traversal in queries by turning O(directory-size) operations into an O(1) hash lookup. https://facebook.github.io/watchman/docs/cmd/query.html#case-sensitivity

defer_vcs: bool

In some circumstances it is desirable for a client to observe the creation of the control files at the start of a version control operation. You may specify that you want this behavior by passing the defer_vcs flag to your subscription command invocation https://facebook.github.io/watchman/docs/cmd/subscribe.html#filesystem-settling

defer: Vec<&'static str>

The defer field specifies a list of state names for which the subscriber wishes to defer the notification stream. https://facebook.github.io/watchman/docs/cmd/subscribe.html#defer

drop: Vec<&'static str>

The drop field specifies a list of state names for which the subscriber wishes to discard the notification stream. https://facebook.github.io/watchman/docs/cmd/subscribe.html#drop

Trait Implementations

impl Clone for SubscribeRequest[src]

impl Debug for SubscribeRequest[src]

impl Default for SubscribeRequest[src]

impl Serialize for SubscribeRequest[src]

Auto Trait Implementations

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.