[−][src]Struct folia::select::Selector
The selector defines matching criteria for a SelectIterator
It is constructed from a Query
given a document, i.e. it is the encoded
form of a query.
Fields
action: Action
datatypes: Vec<DataTypeSelector>
elementtype: Cmp<ElementType>
elementgroup: Cmp<ElementGroup>
contexttype: Cmp<ElementType>
set: Cmp<DecKey>
class: Cmp<ClassKey>
processor: Cmp<ProcKey>
subset: Cmp<SubsetKey>
confidence: Cmp<f64>
annotator: Cmp<String>
annotatortype: Cmp<ProcessorType>
next: Option<Box<Selector>>
Implementations
impl Selector
[src]
pub fn from_query(
document: &Document,
query: &Query
) -> Result<Self, FoliaError>
[src]
document: &Document,
query: &Query
) -> Result<Self, FoliaError>
Builds a new selector given a query and a document (effectively encoding the query into a selector for the specified document)
pub fn with_elements(self) -> Self
[src]
Sets the selector to also yield Folia Elements (you usually don't need this as it's the default or already implied in Selector construction)
pub fn with_text(self) -> Self
[src]
Sets the selector to also yield XML text
pub fn with_comments(self) -> Self
[src]
Sets the selector to also yield XML comments
pub fn element(self, value: Cmp<ElementType>) -> Self
[src]
Constrains the selector by element type
pub fn elements() -> Self
[src]
Creates a selector on elements
pub fn all_data() -> Self
[src]
Creates a selector on all data (alias for Selector::default())
pub fn elementgroup(self, value: Cmp<ElementGroup>) -> Self
[src]
Constrains the selector by element group
pub fn and(self, selector: Selector) -> Self
[src]
Add another selector, the resulting selection will then consist of the union of the selectors. This can be chained multiple times.
pub fn matchable(&self) -> bool
[src]
The selector determines whether it is matchable in the encoding stage, when references are made to sets or classes that don't exist in the document, then it is unmatchable and there is no sense in actually performing any matching.
pub fn matches(&self, document: &Document, item: &DataType) -> bool
[src]
Tests if the selector matches against the specified data item, given an element store.
There is no need to invoke this directly if you use a SelectIterator
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnwindSafe for Selector
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> 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,