pub struct Preset {
pub id: String,
pub label: String,
pub title: String,
pub prompt: String,
pub doc_url: Option<String>,
pub sort_metric: String,
pub connections: Vec<String>,
}Expand description
A Prompt-Generator preset (a refactoring principle): a ready-to-paste AI
instruction plus how the UI seeds the node selection for it. The orchestrator
builds a generic default set and hands it to LanguagePlugin::presets,
which may pass it through, edit, drop or extend per language.
Fields§
§id: StringStable id / short code shown on the button (e.g. "ADP").
label: StringButton label (usually the id).
title: StringFull principle title (first heading of the generated prompt).
prompt: StringThe prompt body (Markdown, language-neutral by default).
doc_url: Option<String>Link to the full principle doc, if any.
sort_metric: StringThe metric the recommended-node list sorts by (an attribute key, or the
pseudo-metric "cycle").
connections: Vec<String>Which connection sets the preset pre-selects: any of "in"/"out"/"common".
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Preset
impl<'de> Deserialize<'de> for Preset
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 Preset
impl RefUnwindSafe for Preset
impl Send for Preset
impl Sync for Preset
impl Unpin for Preset
impl UnsafeUnpin for Preset
impl UnwindSafe for Preset
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