diff --git a/src/api/textselection.rs b/src/api/textselection.rs index ec19448..0e551a3 100644 --- a/src/api/textselection.rs +++ b/src/api/textselection.rs @@ -42,6 +42,11 @@ impl<'store> FullHandle for 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> { + /// Returns the higher level structure + pub fn as_resulttextselection(self) -> ResultTextSelection<'store> { + ResultTextSelection::Bound(self) + } + /// Return the begin position (unicode points) pub fn begin(&self) -> usize { self.as_ref().begin()