pub struct DocumentationSnippet {
pub page_title: Option<String>,
pub code_title: Option<String>,
pub code_description: Option<String>,
pub code_language: Option<String>,
pub code_tokens: Option<u64>,
pub code_id: Option<String>,
pub code_list: Option<Vec<CodeBlock>>,
pub relevance: Option<f64>,
pub model: Option<String>,
}Expand description
Represents a single documentation excerpt returned by the docs endpoint (JSON mode).
Fields§
§page_title: Option<String>Page title of the source documentation page, if available.
code_title: Option<String>Title of this specific code snippet, if available.
code_description: Option<String>Description accompanying the code snippet, if available.
code_language: Option<String>Primary programming language of the snippet, if available.
code_tokens: Option<u64>Number of tokens in this snippet, if available.
code_id: Option<String>Unique identifier or source URL of this snippet, if available.
code_list: Option<Vec<CodeBlock>>List of code blocks contained in this snippet.
relevance: Option<f64>Relevance score for the query, if available.
model: Option<String>Model used to generate or rank this snippet, if available.
Trait Implementations§
Source§impl Clone for DocumentationSnippet
impl Clone for DocumentationSnippet
Source§fn clone(&self) -> DocumentationSnippet
fn clone(&self) -> DocumentationSnippet
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentationSnippet
impl Debug for DocumentationSnippet
Source§impl<'de> Deserialize<'de> for DocumentationSnippet
impl<'de> Deserialize<'de> for DocumentationSnippet
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 Freeze for DocumentationSnippet
impl RefUnwindSafe for DocumentationSnippet
impl Send for DocumentationSnippet
impl Sync for DocumentationSnippet
impl Unpin for DocumentationSnippet
impl UnsafeUnpin for DocumentationSnippet
impl UnwindSafe for DocumentationSnippet
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