#[non_exhaustive]pub struct Passage {
pub source_id: String,
pub text: String,
pub rank: u32,
pub start: Option<u32>,
pub end: Option<u32>,
}Expand description
One matching passage of a source.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source_id: StringThe source it came from.
text: StringThe indexed text of the passage.
rank: u32Rank is global across the notebook, best first. The server sorts before applying a limit, so the order you receive is the ranking.
start: Option<u32>Character offsets into the source’s indexed text. A passage starting at
zero arrives with the field absent, so absent is reported as None
rather than guessed as zero.
end: Option<u32>The offset just past the passage, absent when the server omitted it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Passage
impl<'de> Deserialize<'de> for Passage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for Passage
impl Freeze for Passage
impl RefUnwindSafe for Passage
impl Send for Passage
impl Sync for Passage
impl Unpin for Passage
impl UnsafeUnpin for Passage
impl UnwindSafe for Passage
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
Mutably borrows from an owned value. Read more