pub struct EnhancedSuggestion {
pub id: SuggestId,
pub title: String,
pub location: SuggestLocation,
pub description: String,
pub design_choices: Option<DesignChoiceSet>,
pub verified_candidates: Vec<VerifiedCandidate>,
pub apply_commands: ApplyCommands,
pub original_confidence: f32,
}Expand description
An enhanced suggestion with design choices and verification.
This extends the basic SuggestOpportunity with:
- Multiple design choice alternatives
- Pre-verified candidates with confidence scores
- Ready-to-use CLI commands
Fields§
§id: SuggestIdUnique suggestion ID.
title: StringHuman-readable title.
location: SuggestLocationPrimary location for display.
description: StringDetailed description.
design_choices: Option<DesignChoiceSet>Optional design choices (for suggestions with alternatives).
verified_candidates: Vec<VerifiedCandidate>Verified candidates (subset of choices that passed verification).
apply_commands: ApplyCommandsCommands for applying this suggestion.
original_confidence: f32Original confidence from pattern detection.
Implementations§
Source§impl EnhancedSuggestion
impl EnhancedSuggestion
Sourcepub fn from_opportunity(
opportunity: &SuggestOpportunity,
id: SuggestId,
) -> EnhancedSuggestion
pub fn from_opportunity( opportunity: &SuggestOpportunity, id: SuggestId, ) -> EnhancedSuggestion
Create an enhanced suggestion from a basic opportunity.
Sourcepub fn with_design_choices(self, choices: DesignChoiceSet) -> EnhancedSuggestion
pub fn with_design_choices(self, choices: DesignChoiceSet) -> EnhancedSuggestion
Set design choices.
Sourcepub fn add_verified_candidate(
self,
candidate: VerifiedCandidate,
) -> EnhancedSuggestion
pub fn add_verified_candidate( self, candidate: VerifiedCandidate, ) -> EnhancedSuggestion
Add a verified candidate.
Sourcepub fn with_description(
self,
description: impl Into<String>,
) -> EnhancedSuggestion
pub fn with_description( self, description: impl Into<String>, ) -> EnhancedSuggestion
Set description.
Sourcepub fn has_choices(&self) -> bool
pub fn has_choices(&self) -> bool
Check if this suggestion has design choices.
Sourcepub fn verified_count(&self) -> usize
pub fn verified_count(&self) -> usize
Get the number of verified candidates.
Sourcepub fn best_candidate(&self) -> Option<&VerifiedCandidate>
pub fn best_candidate(&self) -> Option<&VerifiedCandidate>
Get the best verified candidate (highest confidence).
Sourcepub fn has_fully_verified(&self) -> bool
pub fn has_fully_verified(&self) -> bool
Check if any candidate is fully verified.
Sourcepub fn fully_verified_candidates(&self) -> Vec<&VerifiedCandidate>
pub fn fully_verified_candidates(&self) -> Vec<&VerifiedCandidate>
Get all fully verified candidates.
Trait Implementations§
Source§impl Clone for EnhancedSuggestion
impl Clone for EnhancedSuggestion
Source§fn clone(&self) -> EnhancedSuggestion
fn clone(&self) -> EnhancedSuggestion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EnhancedSuggestion
impl Debug for EnhancedSuggestion
Source§impl<'de> Deserialize<'de> for EnhancedSuggestion
impl<'de> Deserialize<'de> for EnhancedSuggestion
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EnhancedSuggestion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EnhancedSuggestion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for EnhancedSuggestion
impl Serialize for EnhancedSuggestion
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for EnhancedSuggestion
impl RefUnwindSafe for EnhancedSuggestion
impl Send for EnhancedSuggestion
impl Sync for EnhancedSuggestion
impl Unpin for EnhancedSuggestion
impl UnsafeUnpin for EnhancedSuggestion
impl UnwindSafe for EnhancedSuggestion
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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