Struct stam::ResultTextSelectionSet
source · pub struct ResultTextSelectionSet<'store> { /* private fields */ }Expand description
A TextSelectionSet holds one or more TextSelection items and a reference to the TextResource from which they’re drawn.
This structure encapsulates such a TextSelectionSet and contains a reference to the underlying AnnotationStore.
Implementations§
source§impl<'store> ResultTextSelectionSet<'store>
impl<'store> ResultTextSelectionSet<'store>
pub fn rootstore(&self) -> &'store AnnotationStore
pub fn resource(&self) -> ResultItem<'store, TextResource>
Applies a TextSelectionOperator to find all other text selections that
are in a specific relation with the current text selection set. Returns an iterator over the TextSelection instances.
(as ResultItem<TextSelection>).
If you are interested in the annotations associated with the found text selections, then use [Self::find_annotations()] instead.
sourcepub fn test(
&self,
operator: &TextSelectionOperator,
other: &ResultTextSelection<'_>
) -> bool
pub fn test( &self, operator: &TextSelectionOperator, other: &ResultTextSelection<'_> ) -> bool
Compares whether a particular spatial relation holds between two text selections
sourcepub fn test_set(
&self,
operator: &TextSelectionOperator,
other: &ResultTextSelectionSet<'_>
) -> bool
pub fn test_set( &self, operator: &TextSelectionOperator, other: &ResultTextSelectionSet<'_> ) -> bool
Compares whether a particular spatial relation holds between this text selections and a set of others
source§impl<'store> ResultTextSelectionSet<'store>
impl<'store> ResultTextSelectionSet<'store>
pub fn inner(&self) -> &TextSelectionSet
pub fn len(&self) -> usize
pub fn iter<'a>( &'a self ) -> impl Iterator<Item = ResultTextSelection<'store>> + 'a
Trait Implementations§
source§impl<'store> From<ResultTextSelectionSet<'store>> for TextSelectionSet
impl<'store> From<ResultTextSelectionSet<'store>> for TextSelectionSet
source§fn from(other: ResultTextSelectionSet<'store>) -> Self
fn from(other: ResultTextSelectionSet<'store>) -> Self
source§impl<'store> FromIterator<ResultTextSelection<'store>> for ResultTextSelectionSet<'store>
impl<'store> FromIterator<ResultTextSelection<'store>> for ResultTextSelectionSet<'store>
source§fn from_iter<T: IntoIterator<Item = ResultTextSelection<'store>>>(
iter: T
) -> Self
fn from_iter<T: IntoIterator<Item = ResultTextSelection<'store>>>( iter: T ) -> Self
source§impl<'store> PartialEq for ResultTextSelectionSet<'store>
impl<'store> PartialEq for ResultTextSelectionSet<'store>
source§impl<'store> PartialOrd for ResultTextSelectionSet<'store>
impl<'store> PartialOrd for ResultTextSelectionSet<'store>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl<'store> Transposable<'store> for ResultTextSelectionSet<'store>
impl<'store> Transposable<'store> for ResultTextSelectionSet<'store>
source§fn transpose(
&self,
via: &ResultItem<'store, Annotation>,
config: TransposeConfig
) -> Result<Vec<AnnotationBuilder<'static>>, StamError>
fn transpose( &self, via: &ResultItem<'store, Annotation>, config: TransposeConfig ) -> Result<Vec<AnnotationBuilder<'static>>, StamError>
source§impl<'store> TryFrom<&ResultItem<'store, Annotation>> for ResultTextSelectionSet<'store>
impl<'store> TryFrom<&ResultItem<'store, Annotation>> for ResultTextSelectionSet<'store>
source§fn try_from(
annotation: &ResultItem<'store, Annotation>
) -> Result<Self, Self::Error>
fn try_from( annotation: &ResultItem<'store, Annotation> ) -> Result<Self, Self::Error>
Auto Trait Implementations§
impl<'store> Freeze for ResultTextSelectionSet<'store>
impl<'store> RefUnwindSafe for ResultTextSelectionSet<'store>
impl<'store> Send for ResultTextSelectionSet<'store>
impl<'store> Sync for ResultTextSelectionSet<'store>
impl<'store> Unpin for ResultTextSelectionSet<'store>
impl<'store> UnwindSafe for ResultTextSelectionSet<'store>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more