[][src]Struct folia::select::SelectElementsItem

pub struct SelectElementsItem<'a> {
    pub element: Element<'a>,
}

The Item returned by SelectElementsIterator, this dereferences directly to &ElementData

Fields

element: Element<'a>

Methods from Deref<Target = Element<'a>>

pub fn get_annotation(
    &self,
    annotationtype: AnnotationType,
    set: Cmp<String>,
    recursion: Recursion
) -> Option<Element<'_>>
[src]

High-level function to get a particular annotation by annotation type and set. This function returns only one annotation (the first one if there are multiple) and returns None if it does not exists.

pub fn get_annotations(
    &self,
    annotationtype: AnnotationType,
    set: Cmp<String>,
    recursion: Recursion
) -> SelectElementsIterator<'_>

Notable traits for SelectElementsIterator<'a>

impl<'a> Iterator for SelectElementsIterator<'a> type Item = SelectElementsItem<'a>;
[src]

High-level function to get a particular annotation by annotation type and set, returns an iterator.

pub fn get_elements(
    &self,
    elementtype: ElementType,
    set: Cmp<String>,
    recursion: Recursion
) -> SelectElementsIterator<'_>

Notable traits for SelectElementsIterator<'a>

impl<'a> Iterator for SelectElementsIterator<'a> type Item = SelectElementsItem<'a>;
[src]

High-level function to get a particular annotation by annotation type and set, returns an iterator.

pub fn get_element(
    &self,
    elementtype: ElementType,
    set: Cmp<String>,
    recursion: Recursion
) -> Option<Element<'_>>
[src]

High-level function to get a particular annotation by element type and set. This function returns only one annotation (the first one if there are multiple) and returns None if it does not exists.

pub fn get_features(&self, subset: Cmp<String>) -> SelectElementsIterator<'_>

Notable traits for SelectElementsIterator<'a>

impl<'a> Iterator for SelectElementsIterator<'a> type Item = SelectElementsItem<'a>;
[src]

High-level function to get a particular feature by annotation type and set, returns an iterator.

pub fn get_feature(&self, subset: Cmp<String>) -> Option<Element<'_>>[src]

High-level function to get a particular feature by annotation type and set, returns an single element (the first feature).

pub fn get_ancestor(
    &self,
    elementtype: ElementType,
    set: Cmp<String>
) -> Option<Element<'_>>
[src]

High level-function to get a particular ancestor by annoation type and set. This function returns only one element

pub fn get_ancestor_by_group(
    &self,
    elementgroup: ElementGroup,
    set: Cmp<String>
) -> Option<Element<'_>>
[src]

High level-function to get a particular ancestor by annoation type and set. This function returns only one element

pub fn get_ancestors(
    &self,
    elementtype: ElementType,
    set: Cmp<String>
) -> AncestorIterator<'_>

Notable traits for AncestorIterator<'a>

impl<'a> Iterator for AncestorIterator<'a> type Item = SelectElementsItem<'a>;
[src]

Returns an iterator over the ancestors of this element, starting with the parent and moving up the tree.

pub fn get_ancestors_by_group(
    &self,
    elementgroup: ElementGroup,
    set: Cmp<String>
) -> AncestorIterator<'_>

Notable traits for AncestorIterator<'a>

impl<'a> Iterator for AncestorIterator<'a> type Item = SelectElementsItem<'a>;
[src]

Returns an iterator over the ancestors of this element, starting with the parent and moving up the tree.

pub fn text_by_key(
    &self,
    set: DecKey,
    textclass: ClassKey,
    strict: bool,
    retaintokenisation: bool,
    previousdelimiter: Option<String>
) -> Result<String, FoliaError>
[src]

Returns the text content of a given element

pub fn get_textdelimiter(
    &self,
    retaintokenisation: bool
) -> Result<Cow<'_, str>, FoliaError>
[src]

Returns the text delimiter for this element

pub fn text(
    &self,
    textparameters: &TextParameters
) -> Result<String, FoliaError>
[src]

Returns the text content of a given element This method takes string parameters for set and textclass, which can be set to None to fallback to the default text set and "current class".

Trait Implementations

impl<'a> Deref for SelectElementsItem<'a>[src]

type Target = Element<'a>

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for SelectElementsItem<'a>

impl<'a> !Send for SelectElementsItem<'a>

impl<'a> !Sync for SelectElementsItem<'a>

impl<'a> Unpin for SelectElementsItem<'a>

impl<'a> !UnwindSafe for SelectElementsItem<'a>

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, U> Into<U> for T where
    U: From<T>, 
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,