pub enum Prompt {
Text(String),
File {
path: String,
args: Option<HashMap<String, String>>,
cwd: Option<PathBuf>,
},
PromptGlobs {
patterns: Vec<String>,
cwd: PathBuf,
},
McpInstructions(Vec<ServerInstructions>),
}Variants§
Text(String)
File
PromptGlobs
Resolve prompt files from glob patterns relative to cwd. Absolute paths are also supported.
McpInstructions(Vec<ServerInstructions>)
Implementations§
Source§impl Prompt
impl Prompt
pub fn text(str: &str) -> Self
pub fn file(path: &str) -> Self
pub fn file_with_args(path: &str, args: HashMap<String, String>) -> Self
pub fn from_globs(patterns: Vec<String>, cwd: PathBuf) -> Self
pub fn with_cwd(self, cwd: PathBuf) -> Self
pub fn mcp_instructions(instructions: Vec<ServerInstructions>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Prompt
impl RefUnwindSafe for Prompt
impl Send for Prompt
impl Sync for Prompt
impl Unpin for Prompt
impl UnsafeUnpin for Prompt
impl UnwindSafe for Prompt
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