pub struct ExplanationPreview {
pub block_path: String,
pub source: Option<SourceSpan>,
pub text: String,
pub match_start_char: u32,
pub match_end_char: u32,
pub content_ranges: Vec<ExplanationContentRange>,
pub clipped_before: bool,
pub clipped_after: bool,
}Expand description
One representative literal window, not a replacement IR block or a summary.
Fields§
§block_path: StringFinal IR coordinate rooted at “root” or “sections/sN[/sN…]”; bN selects a block, iN/dN a list/definition item, and rN/cN a table cell. All indices are zero-based; this is not a source/Markdown byte offset.
source: Option<SourceSpan>Matched block source position, when known (never a substituted entry span).
text: StringSafely projected original text, at most 1024 Unicode scalar values.
match_start_char: u32Start of the complete match in text, in zero-based Unicode scalars.
match_end_char: u32Exclusive end of the complete match in text, in Unicode scalars.
content_ranges: Vec<ExplanationContentRange>Positions of this reported match in an available returned body, not offsets in this clipped window. Empty when the body is unavailable.
clipped_before: boolThe representative window excludes preceding block text.
clipped_after: boolThe representative window excludes following block text.
Trait Implementations§
Source§impl Clone for ExplanationPreview
impl Clone for ExplanationPreview
Source§fn clone(&self) -> ExplanationPreview
fn clone(&self) -> ExplanationPreview
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExplanationPreview
impl Debug for ExplanationPreview
Source§impl<'de> Deserialize<'de> for ExplanationPreview
impl<'de> Deserialize<'de> for ExplanationPreview
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>,
impl Eq for ExplanationPreview
Source§impl JsonSchema for ExplanationPreview
impl JsonSchema for ExplanationPreview
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more