pub struct GenerationContext {
pub generation_type: String,
pub language: String,
pub input: String,
pub metadata: HashMap<String, Value>,
}Expand description
Context for code generation that rules can match against
Fields§
§generation_type: StringType of generation (e.g., “function”, “class”, “module”)
language: StringLanguage being generated
input: StringCurrent code or prompt
metadata: HashMap<String, Value>Additional context metadata
Implementations§
Trait Implementations§
Source§impl Clone for GenerationContext
impl Clone for GenerationContext
Source§fn clone(&self) -> GenerationContext
fn clone(&self) -> GenerationContext
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 GenerationContext
impl RefUnwindSafe for GenerationContext
impl Send for GenerationContext
impl Sync for GenerationContext
impl Unpin for GenerationContext
impl UnwindSafe for GenerationContext
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