pub struct DocChunk {
pub text: String,
pub heading_path: Vec<String>,
pub start: usize,
pub end: usize,
pub tokens: usize,
}Expand description
正文 Markdown 的一块。
Fields§
§text: String§heading_path: Vec<String>从最外层到最内层的标题。
start: usize在 markdown 里的 UTF-8 字节区间。
end: usize§tokens: usizetoken 估算:拉丁文按空白分词,中日韩每个字算一个。
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DocChunk
impl<'de> Deserialize<'de> for DocChunk
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
impl StructuralPartialEq for DocChunk
Auto Trait Implementations§
impl Freeze for DocChunk
impl RefUnwindSafe for DocChunk
impl Send for DocChunk
impl Sync for DocChunk
impl Unpin for DocChunk
impl UnsafeUnpin for DocChunk
impl UnwindSafe for DocChunk
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