pub struct CompactOpts {
pub mode: CompactMode,
pub style: Style,
pub target_tokens: Option<usize>,
pub focus: Option<String>,
pub preserve: Vec<PreserveSection>,
pub backend_name: String,
}Expand description
One summarization request after defaults have been merged.
target_tokens counts via the configured tokenizer family on the
service side; backends treat it as advisory text in the prompt
(Abstractive) or as a hard greedy cap (Extractive/Headlines).
Note: the derived PartialEq/Eq is order-sensitive on preserve
(it’s a Vec), but the params_hash cache key is order-invariant —
it sorts and dedups preserve before hashing. Two CompactOpts that
compare non-equal under == may still produce the same cache key.
Keep this divergence in mind if you ever switch the cache key to
derive from the struct directly.
Fields§
§mode: CompactMode§style: Style§target_tokens: Option<usize>§focus: Option<String>§preserve: Vec<PreserveSection>§backend_name: StringThe resolved backend’s config-key name (e.g. “default”, “fast”).
Filled in by SummarizerService::compact from the registry; backends
see it for logging only.
Trait Implementations§
Source§impl Clone for CompactOpts
impl Clone for CompactOpts
Source§fn clone(&self) -> CompactOpts
fn clone(&self) -> CompactOpts
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 CompactOpts
impl Debug for CompactOpts
impl Eq for CompactOpts
Source§impl PartialEq for CompactOpts
impl PartialEq for CompactOpts
Source§fn eq(&self, other: &CompactOpts) -> bool
fn eq(&self, other: &CompactOpts) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompactOpts
Auto Trait Implementations§
impl Freeze for CompactOpts
impl RefUnwindSafe for CompactOpts
impl Send for CompactOpts
impl Sync for CompactOpts
impl Unpin for CompactOpts
impl UnsafeUnpin for CompactOpts
impl UnwindSafe for CompactOpts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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