Struct tantivy_tokenizer_api::Token
source · pub struct Token {
pub offset_from: usize,
pub offset_to: usize,
pub position: usize,
pub text: String,
pub position_length: usize,
}
Expand description
Token
Fields§
§offset_from: usize
Offset (byte index) of the first character of the token. Offsets shall not be modified by token filters.
offset_to: usize
Offset (byte index) of the last character of the token + 1. The text that generated the token should be obtained by &text[token.offset_from..token.offset_to]
position: usize
Position, expressed in number of tokens.
text: String
Actual text content of the token.
position_length: usize
Is the length expressed in term of number of original tokens.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Token
impl<'de> Deserialize<'de> for Token
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
source§impl PartialEq for Token
impl PartialEq for Token
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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