Struct hypothesis::annotations::SearchQuery[][src]

pub struct SearchQuery {
    pub limit: u8,
    pub sort: Sort,
    pub search_after: String,
    pub offset: usize,
    pub order: Order,
    pub uri: String,
    pub uri_parts: String,
    pub wildcard_uri: String,
    pub user: String,
    pub group: String,
    pub tag: String,
    pub tags: Vec<String>,
    pub any: String,
    pub quote: String,
    pub references: String,
    pub text: String,
}

Options to filter and sort search results. See the Hypothesis API docs for more details on using these fields

Fields

limit: u8

The maximum number of annotations to return.

Default: 20. Range: [ 0 .. 200 ]

sort: Sort

The field by which annotations should be sorted One of created, updated, id, group, user

Default: updated

search_after: String

Example: “2019-01-03T19:46:09.334Z”

Define a start point for a subset (page) of annotation search results. NOTE: make sure to set sort to Sort::Asc if using search_after

offset: usize

The number of initial annotations to skip in the result set.

Default: 0. Range: <= 9800. search_after is more efficient.

order: Order

The order in which the results should be sorted. One of asc, desc

Default: desc

uri: String

Limit the results to annotations matching the specific URI or equivalent URIs.

URI can be a URL (a web page address) or a URN representing another kind of resource such as DOI (Digital Object Identifier) or a PDF fingerprint.

uri_parts: String

Limit the results to annotations containing the given keyword (tokenized chunk) in the URI. The value must exactly match an individual URI keyword.

wildcard_uri: String

Limit the results to annotations whose URIs match the wildcard pattern.

user: String

Limit the results to annotations made by the specified user. (in the format acct:<username>@<authority>)

group: String

Limit the results to annotations made in the specified group (by group ID).

tag: String

Limit the results to annotations tagged with the specified value.

tags: Vec<String>

Similar to tag but allows a list of multiple tags.

any: String

Limit the results to annotations who contain the indicated keyword in any of the following fields: quote, tags, text, url

quote: String

Limit the results to annotations that contain this text inside the text that was annotated.

references: String

Returns annotations that are replies to this parent annotation ID.

text: String

Limit the results to annotations that contain this text in their textual body.

Implementations

impl SearchQuery[src]

Trait Implementations

impl Clone for SearchQuery[src]

impl Debug for SearchQuery[src]

impl Default for SearchQuery[src]

impl PartialEq<SearchQuery> for SearchQuery[src]

impl Serialize for SearchQuery[src]

impl StructOpt for SearchQuery[src]

impl StructOptInternal for SearchQuery[src]

impl StructuralPartialEq for SearchQuery[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> Instrument for T[src]

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

impl<D> OwoColorize for D

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.