SearchQueryBuilder

Struct SearchQueryBuilder 

Source
pub struct SearchQueryBuilder { /* private fields */ }
Expand description

Builder for SearchQuery.

Implementations§

Source§

impl SearchQueryBuilder

Source

pub fn limit(&mut self, value: u8) -> &mut Self

The maximum number of annotations to return.

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

Source

pub fn sort(&mut self, value: Sort) -> &mut Self

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

Default: updated

Source

pub fn search_after<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn offset(&mut self, value: usize) -> &mut Self

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

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

Source

pub fn order(&mut self, value: Order) -> &mut Self

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

Default: desc

Source

pub fn uri<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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.

Source

pub fn uri_parts<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn wildcard_uri<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn user<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn group<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn tag<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Limit the results to annotations tagged with the specified value.

Source

pub fn tags(&mut self, value: Vec<String>) -> &mut Self

Similar to tag but allows a list of multiple tags.

Source

pub fn any<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn quote<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn references<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Returns annotations that are replies to this parent annotation ID.

Source

pub fn text<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

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

Source

pub fn builder(&self) -> Result<SearchQuery, SearchQueryBuilderError>

Builds a new SearchQuery.

§Errors

If a required field has not been initialized.

Source§

impl SearchQueryBuilder

Source

pub fn build(&self) -> Result<SearchQuery, HypothesisError>

Builds a new SearchQuery.

Trait Implementations§

Source§

impl Clone for SearchQueryBuilder

Source§

fn clone(&self) -> SearchQueryBuilder

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 Default for SearchQueryBuilder

Source§

fn default() -> Self

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

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,