SearchQuery

Struct SearchQuery 

Source
pub struct SearchQuery {
Show 16 fields 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,
}
Expand description

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§

Trait Implementations§

Source§

impl Clone for SearchQuery

Source§

fn clone(&self) -> SearchQuery

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SearchQuery

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SearchQuery

Source§

fn default() -> SearchQuery

Returns the “default value” for a type. Read more
Source§

impl PartialEq for SearchQuery

Source§

fn eq(&self, other: &SearchQuery) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SearchQuery

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SearchQuery

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,