pub struct ResultItem<'store, T>where
T: Storable,{ /* private fields */ }Expand description
This is a smart pointer that encapsulates both the item and the store that owns it. It allows the item to have some more introspection as it knows who its immediate parent is. It is heavily used as a return type all throughout the higher-level API. Most API traits are implemented for a particular variant of this type.
For further documentation, look carefully for the implementation for T that you want information on:
Implementations§
Source§impl<'store> ResultItem<'store, Annotation>
This is the implementation of the high-level API for Annotation.
impl<'store> ResultItem<'store, Annotation>
This is the implementation of the high-level API for Annotation.
Sourcepub fn resources_as_metadata(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, TextResource>>> ⓘ
pub fn resources_as_metadata( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, TextResource>>> ⓘ
Returns an iterator over the resources that this annotation (by its target selector) references.
This returns only resources that are targeted via a Selector::ResourceSelector and
returns no duplicates even if a resource is referenced multiple times.
Sourcepub fn resources(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, TextResource>>> ⓘ
pub fn resources( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, TextResource>>> ⓘ
Returns an iterator over the resources that this annotation (by its target selector) references.
This returns only resources that are targeted via a Selector::TextSelector and
returns no duplicates even if a resource is referenced multiple times.
Sourcepub fn datasets(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationDataSet>> + 'store> ⓘ
pub fn datasets( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationDataSet>> + 'store> ⓘ
Returns an iterator over the datasets that this annotation (by its target selector) references via a Selector::DataSetSelector.
This returns no duplicates even if a dataset is referenced multiple times.
Sourcepub fn annotations_in_targets(
&self,
depth: AnnotationDepth,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations_in_targets( &self, depth: AnnotationDepth, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Iterates over all the annotations this annotation targets (i.e. via a Selector::AnnotationSelector)
Use Self::annotations() if you want to find the annotations that reference this one (the reverse operation).
Results will be in textual order unless depth is set to AnnotationDepth::Max or a Selector::DirectionalSelector is involved, then they are in the exact order as they were selected.
Sourcepub fn annotations(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over all annotations that reference this annotation, if any
If you want to find the annotations this annotation targets, then use Self::annotations_in_targets() instead.
Results will be in chronological order and without duplicates, if you want results in textual order, add .iter().textual_order()
Sourcepub fn annotations_handles(&self) -> Annotations<'store>
pub fn annotations_handles(&self) -> Annotations<'store>
Returns a borrowed collection of all the annotations that reference this annotation, if any
If you want to find the annotations this annotation targets, then use Self::annotations_in_targets() instead.
Results will be in chronological order and without duplicates, if you want results in textual order, add .iter().textual_order()
Sourcepub fn textselections(
&self,
) -> impl Iterator<Item = ResultTextSelection<'store>>
pub fn textselections( &self, ) -> impl Iterator<Item = ResultTextSelection<'store>>
Iterate over all text selections this annotation references (i.e. via Selector::TextSelector)
They are returned in textual order, except in case a Selector::DirectionalSelector is involved, then they are in the exact order as they were selected.
Sourcepub fn textselections_count(&self) -> usize
pub fn textselections_count(&self) -> usize
Returns the number of textselections under the annotation
Sourcepub fn text(&self) -> impl Iterator<Item = &'store str>
pub fn text(&self) -> impl Iterator<Item = &'store str>
Iterates over all text slices this annotation refers to
They are returned in textual order, or in case a Selector::DirectionalSelector is involved, in the exact order as they were selected.
Sourcepub fn text_simple(&self) -> Option<&'store str>
pub fn text_simple(&self) -> Option<&'store str>
If this annotation refers to a single simple text slice, this returns it. If not contains no text or multiple text references, it returns None.
Sourcepub fn text_join(&self, delimiter: &str) -> String
pub fn text_join(&self, delimiter: &str) -> String
Returns all underlying text for this annotation concatenated
Shortcut for .textselections().text_join()
Sourcepub fn resource(&self) -> Option<ResultItem<'store, TextResource>>
pub fn resource(&self) -> Option<ResultItem<'store, TextResource>>
Returns the (single!) resource the annotation points to. Only works if this annotation targets using a Selector::TextSelector,
Selector::ResourceSelector or Selector::AnnotationSelector, and not for complex selectors.
Use Self::resources() if want to iterate over all resources instead.
AnnotationSelectors are followed recursively if needed.
Sourcepub fn data(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationData>>> ⓘ
pub fn data( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationData>>> ⓘ
Get an iterator over all data (AnnotationData) for this annotation.
Sourcepub fn has_data(&self, data: &ResultItem<'_, AnnotationData>) -> bool
pub fn has_data(&self, data: &ResultItem<'_, AnnotationData>) -> bool
Tests if the annotation has certain data, returns a boolean.
This will be a bit quicker than using .data().filter_one().
Sourcepub fn data_as_metadata(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationData>>> ⓘ
pub fn data_as_metadata( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationData>>> ⓘ
Returns an iterator over the AnnotationData that this annotation targets directly.
This returns only resources that are targeted via a Selector::AnnotationDataSelector and
returns no duplicates even if data is referenced multiple times.
Sourcepub fn keys(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, DataKey>>> ⓘ
pub fn keys( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, DataKey>>> ⓘ
Get an iterator over all keys (DataKey) used by data of this annotation. Shortcut for .data().keys().
Sourcepub fn keys_as_metadata(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, DataKey>>> ⓘ
pub fn keys_as_metadata( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, DataKey>>> ⓘ
Returns an iterator over the DataKeys that this annotation targets directly.
This returns only resources that are targeted via a Selector::DataKeySelector and
returns no duplicates even if a key is referenced multiple times.
Applies a TextSelectionOperator to find all other text selections that
are in a specific relation with the text selected by this annotation. Returns an iterator over the crate::TextSelection instances, in textual order.
(as ResultTextSelection).
This method is slightly different from .textselections().related_text(). This method
will consider multiple textselections pertaining to this annotation as a single set, the
other method treats each textselection separately.
Sourcepub fn textselectionset(&self) -> Option<ResultTextSelectionSet<'store>>
pub fn textselectionset(&self) -> Option<ResultTextSelectionSet<'store>>
Returns the text this resources references as a single text selection set.
This only works if the resource references text AND all text pertains to a single resource.
If it can reference multiple resources, use textselectionsets() instead.
Sourcepub fn textselectionset_in(
&self,
resource: impl Request<TextResource>,
) -> Option<ResultTextSelectionSet<'store>>
pub fn textselectionset_in( &self, resource: impl Request<TextResource>, ) -> Option<ResultTextSelectionSet<'store>>
Returns the text this resources references as a single text selection set. The text must pertain to the specified resource.
Sourcepub fn textselectionsets(
&self,
) -> impl Iterator<Item = ResultTextSelectionSet<'store>>
pub fn textselectionsets( &self, ) -> impl Iterator<Item = ResultTextSelectionSet<'store>>
Groups text selections targeting the same resource together in a TextSelectionSet.
Sourcepub fn test(
&self,
operator: &TextSelectionOperator,
other: &ResultItem<'store, Annotation>,
) -> bool
pub fn test( &self, operator: &TextSelectionOperator, other: &ResultItem<'store, Annotation>, ) -> bool
Compares whether a particular spatial relation holds between two annotations
Sourcepub fn test_textselectionset(
&self,
operator: &TextSelectionOperator,
other: &ResultTextSelectionSet<'_>,
) -> bool
pub fn test_textselectionset( &self, operator: &TextSelectionOperator, other: &ResultTextSelectionSet<'_>, ) -> bool
Compares whether a particular spatial relation holds between this annotation and a textselection set.
Sourcepub fn test_textselection(
&self,
operator: &TextSelectionOperator,
other: &ResultTextSelection<'_>,
) -> bool
pub fn test_textselection( &self, operator: &TextSelectionOperator, other: &ResultTextSelection<'_>, ) -> bool
Compares whether a particular spatial relation holds between this annotation and a textselection
Sourcepub fn substore(&self) -> Option<ResultItem<'store, AnnotationSubStore>>
pub fn substore(&self) -> Option<ResultItem<'store, AnnotationSubStore>>
Returns the substore this annotation is a part of (if any)
Source§impl<'store> ResultItem<'store, AnnotationData>
This is the implementation of the high-level API for AnnotationData.
impl<'store> ResultItem<'store, AnnotationData>
This is the implementation of the high-level API for AnnotationData.
Sourcepub fn set(&self) -> ResultItem<'store, AnnotationDataSet>
pub fn set(&self) -> ResultItem<'store, AnnotationDataSet>
Return a reference to the dataset that holds this data
Sourcepub fn key(&self) -> ResultItem<'store, DataKey>
pub fn key(&self) -> ResultItem<'store, DataKey>
Return a reference to the key for this data
Sourcepub fn annotations(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over all annotations (Annotation) that makes use of this data.
The iterator returns the annotations as ResultItem<Annotation>.
Especially useful in combination with a call to [ResultItem<AnnotationDataSet>.find_data()] or [AnnotationDataSet.annotationdata()] first.
Sourcepub fn annotations_len(&self) -> usize
pub fn annotations_len(&self) -> usize
Returns the number of annotations (Annotation) that make use of this data.
Sourcepub fn annotations_as_metadata(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations_as_metadata( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over all annotations about this data, i.e. Annotations with an AnnotationDataSelector. Such annotations can be considered metadata.
pub fn test( &self, key: impl Request<DataKey>, operator: &DataOperator<'_>, ) -> bool
Sourcepub fn resources_as_metadata(
&self,
) -> <BTreeSet<ResultItem<'store, TextResource>> as IntoIterator>::IntoIter
pub fn resources_as_metadata( &self, ) -> <BTreeSet<ResultItem<'store, TextResource>> as IntoIterator>::IntoIter
Returns an set of all text resources that make use of this data via annotations via a ResourceSelector (i.e. as metadata)
Sourcepub fn resources(
&self,
) -> <BTreeSet<ResultItem<'store, TextResource>> as IntoIterator>::IntoIter
pub fn resources( &self, ) -> <BTreeSet<ResultItem<'store, TextResource>> as IntoIterator>::IntoIter
Returns an iterator over all text resources that make use of this data via annotations via a TextSelector (i.e. on text)
Sourcepub fn datasets(
&self,
) -> <BTreeSet<ResultItem<'store, AnnotationDataSet>> as IntoIterator>::IntoIter
pub fn datasets( &self, ) -> <BTreeSet<ResultItem<'store, AnnotationDataSet>> as IntoIterator>::IntoIter
Returns an iterator over all data sets that annotations using this data reference via a DataSetSelector (i.e. as metadata)
pub fn to_json_string(&self) -> Result<String, StamError>
pub fn to_json_value(&self) -> Result<Value, StamError>
Source§impl<'store> ResultItem<'store, AnnotationDataSet>
impl<'store> ResultItem<'store, AnnotationDataSet>
Sourcepub fn data(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationData>>> ⓘ
pub fn data( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationData>>> ⓘ
Returns an iterator over all data in this set.
Sourcepub fn keys(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, DataKey>>> ⓘ
pub fn keys( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, DataKey>>> ⓘ
Returns an iterator over all keys in this set
Sourcepub fn key(
&self,
key: impl Request<DataKey>,
) -> Option<ResultItem<'store, DataKey>>
pub fn key( &self, key: impl Request<DataKey>, ) -> Option<ResultItem<'store, DataKey>>
Retrieve a DataKey in this set
Sourcepub fn annotationdata(
&self,
annotationdata: impl Request<AnnotationData>,
) -> Option<ResultItem<'store, AnnotationData>>
pub fn annotationdata( &self, annotationdata: impl Request<AnnotationData>, ) -> Option<ResultItem<'store, AnnotationData>>
Retrieve a single AnnotationData in this set
Sourcepub fn annotations(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over annotations that directly point at the dataset, i.e. are metadata for it (via a DataSetSelector).
Sourcepub fn find_data<'q>(
&self,
key: impl Request<DataKey>,
value: DataOperator<'q>,
) -> Box<dyn Iterator<Item = ResultItem<'store, AnnotationData>> + 'store>where
'q: 'store,
pub fn find_data<'q>(
&self,
key: impl Request<DataKey>,
value: DataOperator<'q>,
) -> Box<dyn Iterator<Item = ResultItem<'store, AnnotationData>> + 'store>where
'q: 'store,
Finds the AnnotationData in the annotation dataset. Returns an iterator over all matches.
If you’re not interested in returning the results but merely testing their presence, use Self::test_data() instead.
If you pass an empty string literal or boolean to key, all keys will be searched.
If you already have a ResultItem<DataKey> , use [ResultItem<DataKey>.find_data()] instead, it’ll be much more efficient.
Value is a DataOperator, it is not wrapped in an Option but can be set to DataOperator::Any to return all values.
§Example
//in this store we have a single annotation, and single annotation data with key 'part-of-speech' and value 'noun':
let dataset = store.dataset("mydataset").or_fail()?;
for annotationdata in dataset.find_data("part-of-speech", DataOperator::Equals("noun".into())) {
assert_eq!(annotationdata.id(), Some("D1"));
assert_eq!(annotationdata.value(), "noun");
}Sourcepub fn test_data<'a>(
&self,
key: impl Request<DataKey>,
value: DataOperator<'a>,
) -> bool
pub fn test_data<'a>( &self, key: impl Request<DataKey>, value: DataOperator<'a>, ) -> bool
Tests if the dataset has certain data, returns a boolean.
If you want to actually retrieve the data, use find_data() instead.
If you pass an empty string literal or boolean to key, all keys will be searched.
Value is a DataOperator, it can be set set to DataOperator::Any to return all values.
Sourcepub fn test(&self, other: impl Request<AnnotationDataSet>) -> bool
pub fn test(&self, other: impl Request<AnnotationDataSet>) -> bool
Tests whether two AnnotationDataSets are the same
Sourcepub fn substores<'a>(
&'a self,
) -> ResultIter<impl Iterator<Item = ResultItem<'a, AnnotationSubStore>>> ⓘ
pub fn substores<'a>( &'a self, ) -> ResultIter<impl Iterator<Item = ResultItem<'a, AnnotationSubStore>>> ⓘ
Returns an iterator over all substores (AnnotationSubStore instances) this dataset is a part of.
Source§impl<'store> ResultItem<'store, DataKey>
This is the implementation of the high-level API for DataKey.
impl<'store> ResultItem<'store, DataKey>
This is the implementation of the high-level API for DataKey.
Sourcepub fn set(&self) -> ResultItem<'store, AnnotationDataSet>
pub fn set(&self) -> ResultItem<'store, AnnotationDataSet>
Returns a reference to the dataset that holds this key
Sourcepub fn data(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationData>>> ⓘ
pub fn data( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationData>>> ⓘ
Returns an iterator over all data (crate::AnnotationData) that makes use of this key.
Use methods on this iterator like [DataIter.filter_value()] to further constrain the results.
Sourcepub fn annotations(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over all annotations (crate::Annotation) that make use of this key.
Sourcepub fn annotations_as_metadata(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations_as_metadata( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over all annotations about this datakey, i.e. Annotations with a DataKeySelector. Such annotations can be considered metadata.
Sourcepub fn annotations_count(&self) -> usize
pub fn annotations_count(&self) -> usize
Returns the number of annotations that make use of this key.
Note: this method has suffix _count instead of _len because it is not O(1) but does actual counting (O(n) at worst).
(This function internally allocates a temporary buffer to ensure no duplicates are returned)
Sourcepub fn test(&self, other: impl Request<DataKey>) -> bool
pub fn test(&self, other: impl Request<DataKey>) -> bool
Tests whether two DataKeys are the same
Sourcepub fn resources_as_metadata(
&self,
) -> BTreeSet<ResultItem<'store, TextResource>>
pub fn resources_as_metadata( &self, ) -> BTreeSet<ResultItem<'store, TextResource>>
Returns a set of all text resources (crate::TextResource) that make use of this key as metadata (via annotations with a ResourceSelector)
Sourcepub fn resources(&self) -> BTreeSet<ResultItem<'store, TextResource>>
pub fn resources(&self) -> BTreeSet<ResultItem<'store, TextResource>>
Returns a set of all text resources (crate::TextResource) that make use of this key via annotations via a ResourceSelector (i.e. as metadata)
Sourcepub fn datasets(&self) -> BTreeSet<ResultItem<'store, AnnotationDataSet>>
pub fn datasets(&self) -> BTreeSet<ResultItem<'store, AnnotationDataSet>>
Returns a set of all data sets (crate::AnnotationDataSet) that annotations using this key reference via a DataSetSelector (i.e. metadata)
Source§impl<'store> ResultItem<'store, TextResource>
This is the implementation of the high-level API for TextResource.
impl<'store> ResultItem<'store, TextResource>
This is the implementation of the high-level API for TextResource.
Sourcepub fn annotations_as_metadata(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations_as_metadata( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over all annotations about this resource as a whole, i.e. Annotations with a ResourceSelector. Such annotations can be considered metadata.
Sourcepub fn annotations(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over all annotations about any text in this resource i.e. Annotations with a TextSelector.
Sourcepub fn textselections(
&self,
) -> impl DoubleEndedIterator<Item = ResultTextSelection<'store>>
pub fn textselections( &self, ) -> impl DoubleEndedIterator<Item = ResultTextSelection<'store>>
Returns an iterator over all text selections that are marked in this resource (i.e. there are one or more annotations on it).
They are returned in textual order, but this does not come with any significant performance overhead. If you want an unsorted version use [self.as_ref().textselections_unsorted()] instead.
Note: This is a double-ended iterator that can be traversed in both directions.
pub fn textselection_by_handle( &self, handle: TextSelectionHandle, ) -> Result<ResultTextSelection<'store>, StamError>
Sourcepub fn to_textselection(self) -> ResultTextSelection<'store>
pub fn to_textselection(self) -> ResultTextSelection<'store>
Get a text selection pointing to the whole resource, you can also call this implicitly via the From trait (resource.into()).
Sourcepub fn textselections_in_range(
&self,
begin: usize,
end: usize,
) -> impl DoubleEndedIterator<Item = ResultTextSelection<'store>>
pub fn textselections_in_range( &self, begin: usize, end: usize, ) -> impl DoubleEndedIterator<Item = ResultTextSelection<'store>>
Returns a sorted double-ended iterator over a range of all textselections and returns all textselections that either start or end in this range (depending on the direction you’re iterating in)
Sourcepub fn textselections_len(&self) -> usize
pub fn textselections_len(&self) -> usize
Returns the number of textselections that are marked in this resource (i.e. there are one or more annotations on it).
Find textselections by applying a text selection operator (TextSelectionOperator) to a
one or more querying textselections. Returns an iterator over all matching
text selections in the resource.
Sourcepub fn annotations_by_metadata_about(
&self,
data: ResultItem<'store, AnnotationData>,
) -> impl Iterator<Item = ResultItem<'store, Annotation>> + 'store
pub fn annotations_by_metadata_about( &self, data: ResultItem<'store, AnnotationData>, ) -> impl Iterator<Item = ResultItem<'store, Annotation>> + 'store
Search for annotations about this resource, satisfying certain exact data that is already known.
For a higher-level variant, see find_data_about, this method is more efficient.
Both the matching data as well as the matching annotation will be returned in an iterator.
Sourcepub fn has_metadata_about(
&self,
data: ResultItem<'store, AnnotationData>,
) -> bool
pub fn has_metadata_about( &self, data: ResultItem<'store, AnnotationData>, ) -> bool
Tests if the resource has certain data in annotations that reference this textselection, returns a boolean.
If you don’t have a data instance yet, use test_data_about() instead.
This method is much more efficient than test_data_about().
Sourcepub fn segmentation(&self) -> SegmentationIter<'store> ⓘ
pub fn segmentation(&self) -> SegmentationIter<'store> ⓘ
Iterator covering the full text of the resource as a sequence of minimum-length non-overlapping TextSelections, in textual order
Sourcepub fn segmentation_in_range(
&self,
begin: usize,
end: usize,
) -> SegmentationIter<'store> ⓘ
pub fn segmentation_in_range( &self, begin: usize, end: usize, ) -> SegmentationIter<'store> ⓘ
Iterator covering a range of text of the resource as a sequence of minimum-length non-overlapping TextSelections, in textual order
Sourcepub fn substores<'a>(
&'a self,
) -> ResultIter<impl Iterator<Item = ResultItem<'a, AnnotationSubStore>>> ⓘ
pub fn substores<'a>( &'a self, ) -> ResultIter<impl Iterator<Item = ResultItem<'a, AnnotationSubStore>>> ⓘ
Returns an iterator over all substores (AnnotationSubStore instances) this resource is a part of.
Source§impl<'store> ResultItem<'store, AnnotationSubStore>
This is the implementation of the high-level API for AnnotationSubStore.
impl<'store> ResultItem<'store, AnnotationSubStore>
This is the implementation of the high-level API for AnnotationSubStore.
Sourcepub fn annotations(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Returns an iterator over all annotations in this substore. Results will be in chronological order
Sourcepub fn resources(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, TextResource>>> ⓘ
pub fn resources( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, TextResource>>> ⓘ
Returns an iterator over all resources in this substore. Results will be in chronological order
Sourcepub fn datasets(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationDataSet>>> ⓘ
pub fn datasets( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, AnnotationDataSet>>> ⓘ
Returns an iterator over all datasets in this substore. Results will be in chronological order
Sourcepub fn substores<'a>(
&'a self,
) -> ResultIter<impl Iterator<Item = ResultItem<'a, AnnotationSubStore>>> ⓘ
pub fn substores<'a>( &'a self, ) -> ResultIter<impl Iterator<Item = ResultItem<'a, AnnotationSubStore>>> ⓘ
Returns an iterator over all substores (AnnotationSubStore instances) in under this substore.
The resulting iterator yields items as a fat pointer ResultItem<AnnotationSubStore>),
which exposes the high-level API. Note that each substore may itself consist of further substores!
Source§impl<'store> ResultItem<'store, TextSelection>
This is the implementation of the high-level API for TextSelection, though most of it is more commonly used via ResultTextSelection.
impl<'store> ResultItem<'store, TextSelection>
This is the implementation of the high-level API for TextSelection, though most of it is more commonly used via ResultTextSelection.
Sourcepub fn as_resulttextselection(self) -> ResultTextSelection<'store>
pub fn as_resulttextselection(self) -> ResultTextSelection<'store>
Returns the higher level structure
Sourcepub fn resource(&self) -> ResultItem<'store, TextResource>
pub fn resource(&self) -> ResultItem<'store, TextResource>
Return the resource (ResultItem<TextResource>) this text selection references.
Sourcepub fn annotations(
&self,
) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
pub fn annotations( &self, ) -> ResultIter<impl Iterator<Item = ResultItem<'store, Annotation>>> ⓘ
Iterates over all annotations that reference this TextSelection
Sourcepub fn annotations_len(&self) -> usize
pub fn annotations_len(&self) -> usize
Returns the number of annotations that reference this text selection
This is more performant than doing self.annotations().count().
Applies a TextSelectionOperator to find all other text selections that
are in a specific relation with the current one. Returns an iterator over the TextSelection instances.
(as ResultTextSelection).
If you are interested in the annotations associated with the found text selections, append annotations().
Source§impl<'store> ResultItem<'store, Annotation>
impl<'store> ResultItem<'store, Annotation>
Sourcepub fn to_webannotation(&self, config: &WebAnnoConfig) -> String
pub fn to_webannotation(&self, config: &WebAnnoConfig) -> String
Outputs the annotation as a W3C Web Annotation, the output will be JSON-LD on a single line without pretty formatting.
Source§impl<'store, T> ResultItem<'store, T>where
T: Storable,
impl<'store, T> ResultItem<'store, T>where
T: Storable,
Sourcepub fn rootstore(&self) -> &'store AnnotationStore
pub fn rootstore(&self) -> &'store AnnotationStore
Get the underlying AnnotationStore
Sourcepub fn handle(&self) -> T::HandleType
pub fn handle(&self) -> T::HandleType
Get the handle (internal identifier) for the contained item
Source§impl<'store> ResultItem<'store, AnnotationSubStore>
impl<'store> ResultItem<'store, AnnotationSubStore>
Source§impl<'store> ResultItem<'store, Annotation>
impl<'store> ResultItem<'store, Annotation>
Sourcepub fn text_checksum(&self, delimiter: &str) -> Option<String>
pub fn text_checksum(&self, delimiter: &str) -> Option<String>
Returns (computes) the SHA-1 checksum of the text of this annotation (if any, empty vec otherwise) Note that this is cryptographically insecure! (but fast)
Sourcepub fn text_validation_delimiter(&self) -> Option<&'store str>
pub fn text_validation_delimiter(&self) -> Option<&'store str>
Returns the text delimiter used for text validation (if any)
Sourcepub fn validation_checksum(&self) -> Option<&'store str>
pub fn validation_checksum(&self) -> Option<&'store str>
Get the text validation checksum associated with this annotation (if any)
To compute the actual checksum, use [text_checksum()]
Sourcepub fn validation_text(&self) -> Option<&'store str>
pub fn validation_text(&self) -> Option<&'store str>
Returns the associated validation text, if any
Sourcepub fn validate_text(&self) -> Option<bool>
pub fn validate_text(&self) -> Option<bool>
Tests if the annotation’s target text is still valid Returns None if there is no validation information in the annotation at all!
Trait Implementations§
Source§impl<'store, T> Clone for ResultItem<'store, T>
impl<'store, T> Clone for ResultItem<'store, T>
Source§impl<'store, T> Debug for ResultItem<'store, T>where
T: Storable,
impl<'store, T> Debug for ResultItem<'store, T>where
T: Storable,
impl<'store, T> Eq for ResultItem<'store, T>where
T: Storable,
Source§impl<'store, 'slf> FindText<'store, 'slf> for ResultItem<'store, TextResource>where
'store: 'slf,
impl<'store, 'slf> FindText<'store, 'slf> for ResultItem<'store, TextResource>where
'store: 'slf,
Source§fn textselection(
&self,
offset: &Offset,
) -> Result<ResultTextSelection<'store>, StamError>
fn textselection( &self, offset: &Offset, ) -> Result<ResultTextSelection<'store>, StamError>
Returns a TextSelection that corresponds to the offset. If the TextSelection
exists, the existing one will be returned.
If it doesn’t exist yet, a new one will be returned, and it won’t have a handle, nor will it be added to the store automatically.
The TextSelection is returned in a fat pointer (ResultTextSelection) that also contains reference to the underlying store.
Source§fn find_text_regex<'regex>(
&self,
expressions: &'regex [Regex],
precompiledset: Option<&RegexSet>,
allow_overlap: bool,
) -> Result<FindRegexIter<'store, 'regex>, StamError>
fn find_text_regex<'regex>( &self, expressions: &'regex [Regex], precompiledset: Option<&RegexSet>, allow_overlap: bool, ) -> Result<FindRegexIter<'store, 'regex>, StamError>
Searches the text using one or more regular expressions, returns an iterator over TextSelections along with the matching expression, this
is held by the FindRegexMatch struct.
Passing multiple regular expressions at once is more efficient than calling this function anew for each one. If capture groups are used in the regular expression, only those parts will be returned (the rest is context). If none are used, the entire expression is returned.
The allow_overlap parameter determines if the matching expressions are allowed to
overlap. It you are doing some form of tokenisation, you also likely want this set to
false. All of this only matters if you supply multiple regular expressions.
Results are returned in the exact order they are found in the text
Source§fn find_text<'fragment>(
&self,
fragment: &'fragment str,
) -> FindTextIter<'store, 'fragment> ⓘ
fn find_text<'fragment>( &self, fragment: &'fragment str, ) -> FindTextIter<'store, 'fragment> ⓘ
Searches for the specified text fragment. Returns an iterator to iterate over all matches in the text.
The iterator returns TextSelection items.
This search is case sensitive, use FindText::find_text_nocase() to search case insensitive.
For more complex and powerful searching use FindText::find_text_regex() instead
If you want to search only a subpart of the text, extract a TextSelection first with
FindText::textselection() and then run FindText::find_text() on that instead.
Source§fn find_text_nocase(&self, fragment: &str) -> FindNoCaseTextIter<'store> ⓘ
fn find_text_nocase(&self, fragment: &str) -> FindNoCaseTextIter<'store> ⓘ
Searches for the specified text fragment. Returns an iterator to iterate over all matches in the text.
The iterator returns TextSelection items.
This search is case insensitive, use FindText::find_text() to search case sensitive. This variant is slightly less performant than the exact variant.
For more complex and powerful searching use FindText::find_text_regex() instead
If you want to search only a subpart of the text, extract a TextSelection first with
FindText::textselection() and then run FindText::find_text_nocase() on that instead.
Source§fn split_text<'b>(&self, delimiter: &'b str) -> SplitTextIter<'store, 'b> ⓘ
fn split_text<'b>(&self, delimiter: &'b str) -> SplitTextIter<'store, 'b> ⓘ
Splits the text of this resource given a delimiter, the resulting iterator yields TextSelection items (as ResultTextSelection).
Source§fn find_text_sequence<'fragment, F>(
&'slf self,
fragments: &'fragment [&'fragment str],
allow_skip_char: F,
case_sensitive: bool,
) -> Option<Vec<ResultTextSelection<'store>>>
fn find_text_sequence<'fragment, F>( &'slf self, fragments: &'fragment [&'fragment str], allow_skip_char: F, case_sensitive: bool, ) -> Option<Vec<ResultTextSelection<'store>>>
TextSelection instances wrapped as ResultTextSelection. Read moreSource§fn trim_text(
&'slf self,
chars: &[char],
) -> Result<ResultTextSelection<'store>, StamError>
fn trim_text( &'slf self, chars: &[char], ) -> Result<ResultTextSelection<'store>, StamError>
chars from both the beginning and end of the text,
returning a smaller TextSelection (as a fat pointer ResultTextSelection). No text is modified.Source§fn trim_text_with<F>(
&'slf self,
f: F,
) -> Result<ResultTextSelection<'store>, StamError>
fn trim_text_with<F>( &'slf self, f: F, ) -> Result<ResultTextSelection<'store>, StamError>
chars that pass the supplied function, from both the beginning and end of the text,
returning a smaller TextSelection (as a fat pointer ResultTextSelection). No text is modified.Source§impl<'store, 'slf> FindText<'store, 'slf> for ResultItem<'store, TextSelection>where
'store: 'slf,
impl<'store, 'slf> FindText<'store, 'slf> for ResultItem<'store, TextSelection>where
'store: 'slf,
Source§fn find_text_regex<'regex>(
&'slf self,
expressions: &'regex [Regex],
precompiledset: Option<&RegexSet>,
allow_overlap: bool,
) -> Result<FindRegexIter<'store, 'regex>, StamError>
fn find_text_regex<'regex>( &'slf self, expressions: &'regex [Regex], precompiledset: Option<&RegexSet>, allow_overlap: bool, ) -> Result<FindRegexIter<'store, 'regex>, StamError>
Searches the text using one or more regular expressions, returns an iterator over TextSelections along with the matching expression, this
is held by the FindRegexMatch struct.
Passing multiple regular expressions at once is more efficient than calling this function anew for each one. If capture groups are used in the regular expression, only those parts will be returned (the rest is context). If none are used, the entire expression is returned.
An offset can be specified to work on a sub-part rather than the entire text (like an existing TextSelection).
The allow_overlap parameter determines if the matching expressions are allowed to
overlap. It you are doing some form of tokenisation, you also likely want this set to
false. All of this only matters if you supply multiple regular expressions.
Results are returned in the exact order they are found in the text
Source§fn find_text<'fragment>(
&'slf self,
fragment: &'fragment str,
) -> FindTextIter<'store, 'fragment> ⓘ
fn find_text<'fragment>( &'slf self, fragment: &'fragment str, ) -> FindTextIter<'store, 'fragment> ⓘ
Searches for the specified text fragment. Returns an iterator to iterate over all matches in the text.
The iterator returns TextSelection items.
For more complex and powerful searching use FindText::find_text_regex() instead
If you want to search only a subpart of the text, extract a TextSelection first and then run FindText::find_text() on that instead.
Source§fn find_text_nocase(&'slf self, fragment: &str) -> FindNoCaseTextIter<'store> ⓘ
fn find_text_nocase(&'slf self, fragment: &str) -> FindNoCaseTextIter<'store> ⓘ
Searches for the specified text fragment. Returns an iterator to iterate over all matches in the text.
The iterator returns TextSelection items.
This search is case insensitive, use FindText::find_text() to search case sensitive. This variant is slightly less performant than the exact variant.
For more complex and powerful searching use FindText::find_text_regex() instead
If you want to search only a subpart of the text, extract a TextSelection first with
FindText::textselection() and then run FindText::find_text_nocase() on that instead.
Source§fn textselection(
&'slf self,
offset: &Offset,
) -> Result<ResultTextSelection<'store>, StamError>
fn textselection( &'slf self, offset: &Offset, ) -> Result<ResultTextSelection<'store>, StamError>
Returns a TextSelection that corresponds to the offset WITHIN the textselection.
This returns a TextSelection with absolute coordinates in the resource.
If the textselection is known (i.e. it has associated annotations), it will be returned as such with a handle (borrowed). If it doesn’t exist yet, a new one will be returned, and it won’t have a handle, nor will it be added to the store automatically.
The TextSelection is returned as in a far pointer (ResultItem) that also contains reference to the underlying store (the TextResource).
Source§fn split_text<'b>(&'slf self, delimiter: &'b str) -> SplitTextIter<'store, 'b> ⓘ
fn split_text<'b>(&'slf self, delimiter: &'b str) -> SplitTextIter<'store, 'b> ⓘ
TextSelection instances that represent partitions
of the text given the specified delimiter. No text is modified. Read moreSource§fn find_text_sequence<'fragment, F>(
&'slf self,
fragments: &'fragment [&'fragment str],
allow_skip_char: F,
case_sensitive: bool,
) -> Option<Vec<ResultTextSelection<'store>>>
fn find_text_sequence<'fragment, F>( &'slf self, fragments: &'fragment [&'fragment str], allow_skip_char: F, case_sensitive: bool, ) -> Option<Vec<ResultTextSelection<'store>>>
TextSelection instances wrapped as ResultTextSelection. Read moreSource§fn trim_text(
&'slf self,
chars: &[char],
) -> Result<ResultTextSelection<'store>, StamError>
fn trim_text( &'slf self, chars: &[char], ) -> Result<ResultTextSelection<'store>, StamError>
chars from both the beginning and end of the text,
returning a smaller TextSelection (as a fat pointer ResultTextSelection). No text is modified.Source§fn trim_text_with<F>(
&'slf self,
f: F,
) -> Result<ResultTextSelection<'store>, StamError>
fn trim_text_with<F>( &'slf self, f: F, ) -> Result<ResultTextSelection<'store>, StamError>
chars that pass the supplied function, from both the beginning and end of the text,
returning a smaller TextSelection (as a fat pointer ResultTextSelection). No text is modified.Source§impl From<&ResultItem<'_, TextSelection>> for Offset
impl From<&ResultItem<'_, TextSelection>> for Offset
Source§fn from(textselection: &ResultItem<'_, TextSelection>) -> Offset
fn from(textselection: &ResultItem<'_, TextSelection>) -> Offset
Source§impl<'a, T> From<&ResultItem<'a, T>> for BuildItem<'a, T>where
T: Storable,
impl<'a, T> From<&ResultItem<'a, T>> for BuildItem<'a, T>where
T: Storable,
Source§fn from(result: &ResultItem<'a, T>) -> Self
fn from(result: &ResultItem<'a, T>) -> Self
Source§impl<'store> From<ResultItem<'store, TextResource>> for ResultTextSelection<'store>
impl<'store> From<ResultItem<'store, TextResource>> for ResultTextSelection<'store>
Source§fn from(resource: ResultItem<'store, TextResource>) -> Self
fn from(resource: ResultItem<'store, TextResource>) -> Self
Source§impl<'store> From<ResultItem<'store, TextSelection>> for ResultTextSelection<'store>
impl<'store> From<ResultItem<'store, TextSelection>> for ResultTextSelection<'store>
Source§fn from(textselection: ResultItem<'store, TextSelection>) -> Self
fn from(textselection: ResultItem<'store, TextSelection>) -> Self
Source§impl<'store> From<ResultItem<'store, TextSelection>> for TextSelectionSet
impl<'store> From<ResultItem<'store, TextSelection>> for TextSelectionSet
Source§fn from(textselection: ResultItem<'store, TextSelection>) -> Self
fn from(textselection: ResultItem<'store, TextSelection>) -> Self
Source§impl<'store> FromIterator<ResultItem<'store, TextSelection>> for TextSelectionSet
impl<'store> FromIterator<ResultItem<'store, TextSelection>> for TextSelectionSet
Source§fn from_iter<T: IntoIterator<Item = ResultItem<'store, TextSelection>>>(
iter: T,
) -> Self
fn from_iter<T: IntoIterator<Item = ResultItem<'store, TextSelection>>>( iter: T, ) -> Self
Source§impl<'store, T> Hash for ResultItem<'store, T>where
T: Storable,
impl<'store, T> Hash for ResultItem<'store, T>where
T: Storable,
Source§impl<'store> IRI<'store> for ResultItem<'store, Annotation>
impl<'store> IRI<'store> for ResultItem<'store, Annotation>
Source§impl<'store> IRI<'store> for ResultItem<'store, AnnotationDataSet>
impl<'store> IRI<'store> for ResultItem<'store, AnnotationDataSet>
Source§impl<'store> IRI<'store> for ResultItem<'store, DataKey>
impl<'store> IRI<'store> for ResultItem<'store, DataKey>
Source§impl<'store> IRI<'store> for ResultItem<'store, TextResource>
impl<'store> IRI<'store> for ResultItem<'store, TextResource>
Source§impl<'store, T> Ord for ResultItem<'store, T>where
T: Storable,
impl<'store, T> Ord for ResultItem<'store, T>where
T: Storable,
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'store, T> PartialEq for ResultItem<'store, T>where
T: Storable,
impl<'store, T> PartialEq for ResultItem<'store, T>where
T: Storable,
Source§impl<'store, T> PartialOrd for ResultItem<'store, T>where
T: Storable,
impl<'store, T> PartialOrd for ResultItem<'store, T>where
T: Storable,
Source§impl<'a, T> Request<T> for &ResultItem<'a, T>where
T: Storable,
impl<'a, T> Request<T> for &ResultItem<'a, T>where
T: Storable,
Source§fn to_handle<'store, S>(&self, _store: &'store S) -> Option<T::HandleType>where
S: StoreFor<T>,
fn to_handle<'store, S>(&self, _store: &'store S) -> Option<T::HandleType>where
S: StoreFor<T>,
Source§fn requested_id(&self) -> Option<&str>
fn requested_id(&self) -> Option<&str>
Source§fn requested_id_owned(self) -> Option<String>
fn requested_id_owned(self) -> Option<String>
Source§fn requested_handle(&self) -> Option<T::HandleType>
fn requested_handle(&self) -> Option<T::HandleType>
Source§impl<'a, T> Request<T> for ResultItem<'a, T>where
T: Storable,
impl<'a, T> Request<T> for ResultItem<'a, T>where
T: Storable,
Source§fn to_handle<'store, S>(&self, _store: &'store S) -> Option<T::HandleType>where
S: StoreFor<T>,
fn to_handle<'store, S>(&self, _store: &'store S) -> Option<T::HandleType>where
S: StoreFor<T>,
Source§fn requested_id(&self) -> Option<&str>
fn requested_id(&self) -> Option<&str>
Source§fn requested_id_owned(self) -> Option<String>
fn requested_id_owned(self) -> Option<String>
Source§fn requested_handle(&self) -> Option<T::HandleType>
fn requested_handle(&self) -> Option<T::HandleType>
Source§impl<'a> Serialize for ResultItem<'a, Annotation>
impl<'a> Serialize for ResultItem<'a, Annotation>
Source§impl<'a> Serialize for ResultItem<'a, AnnotationData>
impl<'a> Serialize for ResultItem<'a, AnnotationData>
Source§impl<'store> Serialize for ResultItem<'store, AnnotationSubStore>
impl<'store> Serialize for ResultItem<'store, AnnotationSubStore>
Source§impl<'store, 'slf> Text<'store, 'slf> for ResultItem<'store, TextResource>where
'store: 'slf,
this implementation mostly defers directly to the wrapped item, documentation is found on the trait and not repeated here
impl<'store, 'slf> Text<'store, 'slf> for ResultItem<'store, TextResource>where
'store: 'slf,
this implementation mostly defers directly to the wrapped item, documentation is found on the trait and not repeated here
Source§fn textlen(&self) -> usize
fn textlen(&self) -> usize
Self::text().len() instead.Source§fn text_by_offset(&self, offset: &Offset) -> Result<&'store str, StamError>
fn text_by_offset(&self, offset: &Offset) -> Result<&'store str, StamError>
Source§fn absolute_cursor(&self, cursor: usize) -> usize
fn absolute_cursor(&self, cursor: usize) -> usize
Source§fn utf8byte(&self, abscursor: usize) -> Result<usize, StamError>
fn utf8byte(&self, abscursor: usize) -> Result<usize, StamError>
Source§fn utf8byte_to_charpos(&self, bytecursor: usize) -> Result<usize, StamError>
fn utf8byte_to_charpos(&self, bytecursor: usize) -> Result<usize, StamError>
Source§fn subslice_utf8_offset(&'slf self, subslice: &str) -> Option<usize>
fn subslice_utf8_offset(&'slf self, subslice: &str) -> Option<usize>
fn is_empty(&'slf self) -> bool
Source§impl<'store, 'slf> Text<'store, 'slf> for ResultItem<'store, TextSelection>where
'store: 'slf,
impl<'store, 'slf> Text<'store, 'slf> for ResultItem<'store, TextSelection>where
'store: 'slf,
Source§fn text_by_offset(&self, offset: &Offset) -> Result<&'store str, StamError>
fn text_by_offset(&self, offset: &Offset) -> Result<&'store str, StamError>
Returns a string reference to a slice of text as specified by the offset
Source§fn utf8byte(&self, abscursor: usize) -> Result<usize, StamError>
fn utf8byte(&self, abscursor: usize) -> Result<usize, StamError>
This converts a unicode point to utf-8 byte, all in relative offsets to this textselection
Source§fn utf8byte_to_charpos(&self, bytecursor: usize) -> Result<usize, StamError>
fn utf8byte_to_charpos(&self, bytecursor: usize) -> Result<usize, StamError>
This converts utf-8 byte to charpos, all in relative offsets to this textselection
Source§fn textlen(&self) -> usize
fn textlen(&self) -> usize
Self::text().len() instead.Source§fn absolute_cursor(&self, cursor: usize) -> usize
fn absolute_cursor(&self, cursor: usize) -> usize
Source§fn subslice_utf8_offset(&'slf self, subslice: &str) -> Option<usize>
fn subslice_utf8_offset(&'slf self, subslice: &str) -> Option<usize>
fn is_empty(&'slf self) -> bool
Source§impl<'store> ToJson for ResultItem<'store, AnnotationSubStore>
impl<'store> ToJson for ResultItem<'store, AnnotationSubStore>
Source§fn to_json_writer<W>(&self, writer: W, compact: bool) -> Result<(), StamError>where
W: Write,
fn to_json_writer<W>(&self, writer: W, compact: bool) -> Result<(), StamError>where
W: Write,
Source§fn to_json_file(&self, filename: &str, config: &Config) -> Result<(), StamError>
fn to_json_file(&self, filename: &str, config: &Config) -> Result<(), StamError>
config, the default is STAM JSON.Source§impl<'store> Translatable<'store> for ResultItem<'store, Annotation>
impl<'store> Translatable<'store> for ResultItem<'store, Annotation>
Source§fn translate(
&self,
via: &TranslationPivot<'store>,
config: TranslateConfig,
) -> Result<Vec<AnnotationBuilder<'static>>, StamError>
fn translate( &self, via: &TranslationPivot<'store>, config: TranslateConfig, ) -> Result<Vec<AnnotationBuilder<'static>>, StamError>
Source§impl<'store> Transposable<'store> for ResultItem<'store, Annotation>
impl<'store> Transposable<'store> for ResultItem<'store, Annotation>
Source§fn transpose(
&self,
via: &TranspositionPivot<'store>,
config: TransposeConfig,
) -> Result<Vec<AnnotationBuilder<'static>>, StamError>
fn transpose( &self, via: &TranspositionPivot<'store>, 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§impl<'store> TryFrom<&ResultItem<'store, Annotation>> for TranslationPivot<'store>
impl<'store> TryFrom<&ResultItem<'store, Annotation>> for TranslationPivot<'store>
Source§impl<'store> TryFrom<&ResultItem<'store, Annotation>> for TranspositionPivot<'store>
impl<'store> TryFrom<&ResultItem<'store, Annotation>> for TranspositionPivot<'store>
Source§impl<'store> TryFrom<ResultItem<'store, Annotation>> for TranslationPivot<'store>
impl<'store> TryFrom<ResultItem<'store, Annotation>> for TranslationPivot<'store>
Source§impl<'store> TryFrom<ResultItem<'store, Annotation>> for TranspositionPivot<'store>
impl<'store> TryFrom<ResultItem<'store, Annotation>> for TranspositionPivot<'store>
Auto Trait Implementations§
impl<'store, T> Freeze for ResultItem<'store, T>
impl<'store, T> RefUnwindSafe for ResultItem<'store, T>
impl<'store, T> Send for ResultItem<'store, T>
impl<'store, T> Sync for ResultItem<'store, T>
impl<'store, T> Unpin for ResultItem<'store, T>
impl<'store, T> UnsafeUnpin for ResultItem<'store, T>
impl<'store, T> UnwindSafe for ResultItem<'store, T>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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