pub enum SummaryStrategy {
None,
Full {
config: SummaryStrategyConfig,
},
Selective {
min_tokens: usize,
branch_only: bool,
config: SummaryStrategyConfig,
},
Lazy {
persist: bool,
config: SummaryStrategyConfig,
},
}Expand description
Strategy for generating summaries.
Variants§
None
No summary generation.
Full
Generate for all nodes.
Fields
§
config: SummaryStrategyConfigStrategy configuration.
Selective
Generate selectively.
Fields
§
config: SummaryStrategyConfigStrategy configuration.
Lazy
Generate on-demand at query time.
Fields
§
config: SummaryStrategyConfigStrategy configuration.
Implementations§
Source§impl SummaryStrategy
impl SummaryStrategy
Sourcepub fn should_generate(
&self,
tree: &DocumentTree,
node_id: NodeId,
token_count: usize,
) -> bool
pub fn should_generate( &self, tree: &DocumentTree, node_id: NodeId, token_count: usize, ) -> bool
Check if we should generate a summary for a node.
Sourcepub fn config(&self) -> SummaryStrategyConfig
pub fn config(&self) -> SummaryStrategyConfig
Get the config.
Trait Implementations§
Source§impl Clone for SummaryStrategy
impl Clone for SummaryStrategy
Source§fn clone(&self) -> SummaryStrategy
fn clone(&self) -> SummaryStrategy
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 SummaryStrategy
impl Debug for SummaryStrategy
Auto Trait Implementations§
impl Freeze for SummaryStrategy
impl RefUnwindSafe for SummaryStrategy
impl Send for SummaryStrategy
impl Sync for SummaryStrategy
impl Unpin for SummaryStrategy
impl UnsafeUnpin for SummaryStrategy
impl UnwindSafe for SummaryStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more