pub struct CodegenPrompt {
pub c_source: String,
pub context: AnalysisContext,
pub instructions: String,
}Expand description
Prompt template for LLM code generation.
Fields§
§c_source: StringC source code
context: AnalysisContextAnalysis context (ownership, lifetimes, locks)
instructions: StringAdditional instructions
Implementations§
Source§impl CodegenPrompt
impl CodegenPrompt
Sourcepub fn new(c_source: &str, context: AnalysisContext) -> Self
pub fn new(c_source: &str, context: AnalysisContext) -> Self
Create a new codegen prompt.
Sourcepub fn with_instructions(self, instructions: &str) -> Self
pub fn with_instructions(self, instructions: &str) -> Self
Set additional instructions.
Trait Implementations§
Source§impl Clone for CodegenPrompt
impl Clone for CodegenPrompt
Source§fn clone(&self) -> CodegenPrompt
fn clone(&self) -> CodegenPrompt
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CodegenPrompt
impl RefUnwindSafe for CodegenPrompt
impl Send for CodegenPrompt
impl Sync for CodegenPrompt
impl Unpin for CodegenPrompt
impl UnsafeUnpin for CodegenPrompt
impl UnwindSafe for CodegenPrompt
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