[−][src]Enum watchman_client::pdu::ClockSpec
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.
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Into<Value> for ClockSpec
[src]
impl Serialize for ClockSpec
[src]
Auto Trait Implementations
impl RefUnwindSafe for ClockSpec
[src]
impl Send for ClockSpec
[src]
impl Sync for ClockSpec
[src]
impl Unpin for ClockSpec
[src]
impl UnwindSafe for ClockSpec
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,