pub struct LlmCodegen { /* private fields */ }Expand description
LLM code generator.
Implementations§
Source§impl LlmCodegen
impl LlmCodegen
Sourcepub fn generate(
&self,
_prompt: &CodegenPrompt,
) -> Result<GeneratedCode, LlmError>
pub fn generate( &self, _prompt: &CodegenPrompt, ) -> Result<GeneratedCode, LlmError>
Generate Rust code from C source with analysis context.
Note: This is a stub for research purposes. Actual LLM integration would require API credentials and network access.
Sourcepub fn parse_response(&self, response: &str) -> Result<GeneratedCode, LlmError>
pub fn parse_response(&self, response: &str) -> Result<GeneratedCode, LlmError>
Parse raw LLM response into generated code.
Supports two formats:
- Markdown code blocks with
rust ... - JSON with { “code”: “…”, “confidence”: …, … }
Trait Implementations§
Source§impl Debug for LlmCodegen
impl Debug for LlmCodegen
Auto Trait Implementations§
impl Freeze for LlmCodegen
impl RefUnwindSafe for LlmCodegen
impl Send for LlmCodegen
impl Sync for LlmCodegen
impl Unpin for LlmCodegen
impl UnsafeUnpin for LlmCodegen
impl UnwindSafe for LlmCodegen
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