[][src]Enum watchman_client::pdu::ClockSpec

pub enum ClockSpec {
    StringClock(String),
    UnixTimestamp(i64),
}

The fundamental clock specifier string. The contents of the string should be considered to be opaque to the client as the server occasionally evolves the meaning of the clockspec and its format is expressly not a stable API.

In particular, there is no defined way for a client to reason about the relationship between any two ClockSpec's.

https://facebook.github.io/watchman/docs/clockspec.html

Variants

StringClock(String)
UnixTimestamp(i64)

Implementations

impl ClockSpec[src]

pub fn null() -> Self[src]

Construct a null clockspec. This indicates a time before any changes occurred and will cause a since generator based query to emit a fresh instance result set that contains all possible matches. It is appropriate to use a null clock in cases where you are starting up from scratch and don't have a saved clock value to use as the basis for your query.

pub fn named_cursor(cursor: &str) -> Self[src]

Construct a named cursor clockspec.

Using a named cursor causes the server to maintain the name -> clock value mapping on the behalf of your tool. This frees your client from the need to manage storing of the clock between queries but does require an exclusive lock for the duration of the query, which serializes the query with all other clients.

The namespace is per watched project so your cursor name must be unique enough to not collide with other tools that use this same feature.

There is no way to clear the value associated with a named cursor.

The first time you use a named cursor, it has an effective value of the null clock.

We do not recommend using named cursors because of the exclusive lock requirement.

pub fn unix_timestamp(time_t: i64) -> Self[src]

A clock specified as a unix timestamp. The watchman server will never generate a clock in this form, but will accept them in since generator based queries. Using UnixTimeStamp is discouraged as it has granularity of 1 second and will often result in over-reporting the same events when they happen in the same second.

Trait Implementations

impl Clone for ClockSpec[src]

impl Debug for ClockSpec[src]

impl Default for ClockSpec[src]

Construct a null clockspec

impl<'de> Deserialize<'de> for ClockSpec[src]

impl Into<Value> for ClockSpec[src]

impl Serialize for ClockSpec[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.