pub struct ProjectContext {
pub instructions: Option<String>,
pub source_path: Option<PathBuf>,
pub warnings: Vec<String>,
pub project_root: PathBuf,
pub is_trusted: bool,
}Expand description
Result of loading project context
Fields§
§instructions: Option<String>The loaded instructions content
source_path: Option<PathBuf>Path to the loaded file (for display)
warnings: Vec<String>Any warnings during loading
project_root: PathBufProject root directory
is_trusted: boolWhether this is a trusted project
Implementations§
Source§impl ProjectContext
impl ProjectContext
Sourcepub fn has_instructions(&self) -> bool
pub fn has_instructions(&self) -> bool
Check if any instructions were loaded
Sourcepub fn as_system_block(&self) -> Option<String>
pub fn as_system_block(&self) -> Option<String>
Get the instructions as a formatted block for system prompt
Trait Implementations§
Source§impl Clone for ProjectContext
impl Clone for ProjectContext
Source§fn clone(&self) -> ProjectContext
fn clone(&self) -> ProjectContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProjectContext
impl RefUnwindSafe for ProjectContext
impl Send for ProjectContext
impl Sync for ProjectContext
impl Unpin for ProjectContext
impl UnsafeUnpin for ProjectContext
impl UnwindSafe for ProjectContext
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