Struct Query

Source
pub struct Query {
    pub action: Action,
    pub elementtype: Cmp<ElementType>,
    pub elementgroup: Cmp<ElementGroup>,
    pub contexttype: Cmp<ElementType>,
    pub set: Cmp<String>,
    pub class: Cmp<String>,
    pub processor: Cmp<String>,
    pub subset: Cmp<String>,
    pub annotator: Cmp<String>,
    pub annotatortype: Cmp<ProcessorType>,
    pub confidence: Cmp<f64>,
}
Expand description

The query defines a search query on a FoLiA document with various matching criteria. It is turned into a Selector, the encoded variant, when given a document.

Fields§

§action: Action§elementtype: Cmp<ElementType>§elementgroup: Cmp<ElementGroup>§contexttype: Cmp<ElementType>§set: Cmp<String>§class: Cmp<String>§processor: Cmp<String>§subset: Cmp<String>§annotator: Cmp<String>§annotatortype: Cmp<ProcessorType>§confidence: Cmp<f64>

Implementations§

Source§

impl Query

Source

pub fn element(self, value: Cmp<ElementType>) -> Self

Add a matching criterion on element type

Source

pub fn contexttype(self, value: Cmp<ElementType>) -> Self

Add a matching criterion on element type for the context

Source

pub fn elementgroup(self, value: Cmp<ElementGroup>) -> Self

Add a matching criterion on element group

Source

pub fn set(self, value: Cmp<String>) -> Self

Add a matching criterion on FoLiA set

Source

pub fn class(self, value: Cmp<String>) -> Self

Add a matching criterion on FoLiA class

Source

pub fn processor(self, value: Cmp<String>) -> Self

Add a matching criterion on processor

Source

pub fn annotator(self, value: Cmp<String>) -> Self

Add a matching criterion on annotator (i.e. the name of a processor)

Source

pub fn annotatortype(self, value: Cmp<ProcessorType>) -> Self

Add a matching criterion on annotator type (i.e. the type of a processor)

Source

pub fn subset(self, value: Cmp<String>) -> Self

Add a matching criterion on a FoLiA subset

Source

pub fn confidence(self, value: Cmp<f64>) -> Self

Add a matching criterion on confidence value

Source

pub fn select() -> Self

Creates an empty (all matching) select query

Trait Implementations§

Source§

impl Clone for Query

Source§

fn clone(&self) -> Query

Returns a copy 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 Query

Source§

fn default() -> Query

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

Auto Trait Implementations§

§

impl Freeze for Query

§

impl RefUnwindSafe for Query

§

impl Send for Query

§

impl Sync for Query

§

impl Unpin for Query

§

impl UnwindSafe for Query

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, 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V