pub struct Suggestion {
pub model_display: String,
pub model_singular: String,
pub admin_name: String,
pub field: String,
pub prompt: String,
pub reason: String,
pub action: &'static str,
pub confidence: Confidence,
}Expand description
One proposed action shown next to a dashboard alert.
Fields§
§model_display: StringThe model’s display name (e.g. "Applicants"). Used for the
button label.
model_singular: StringThe model’s singular form (e.g. "Applicant"). Used in the
planner prompt.
admin_name: StringThe URL slug under /admin/<admin_name> — also used as the
routing key under /admin/suggestions/<admin_name>/<field>.
field: StringField name the suggestion would add.
prompt: StringNatural-language prompt handed to the planner when the user
accepts. Example: "add annual_income to applicants".
reason: StringOne-line human rationale shown beside the button (“Housing industry convention”, “GDPR retention required”, …).
action: &'static strShort verb tag for the action type. Today always
"add_field"; reserved so future variants ("make_required"
etc.) can land without changing this struct.
confidence: ConfidenceHow confident the engine is that this is the right move.
Implementations§
Trait Implementations§
Source§impl Clone for Suggestion
impl Clone for Suggestion
Source§fn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Suggestion
impl Debug for Suggestion
Source§impl PartialEq for Suggestion
impl PartialEq for Suggestion
impl Eq for Suggestion
impl StructuralPartialEq for Suggestion
Auto Trait Implementations§
impl Freeze for Suggestion
impl RefUnwindSafe for Suggestion
impl Send for Suggestion
impl Sync for Suggestion
impl Unpin for Suggestion
impl UnsafeUnpin for Suggestion
impl UnwindSafe for Suggestion
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§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