pub struct ToolHints {
pub requires_full_context: bool,
pub apply_atomically: bool,
pub may_break_tests: bool,
pub requires_compilation: bool,
}Expand description
Behavioral hints for refactoring operations.
Provides LLMs with guidance on safe operations and potential side effects.
Fields§
§requires_full_context: boolWhether this operation requires full context (closures, impl blocks).
apply_atomically: boolWhether this operation must be applied atomically (always true for splice).
may_break_tests: boolWhether this operation may break tests (public functions, trait changes).
requires_compilation: boolWhether this operation requires compilation (type-changing operations).
Implementations§
Source§impl ToolHints
impl ToolHints
Sourcepub fn with_requires_full_context(self, value: bool) -> Self
pub fn with_requires_full_context(self, value: bool) -> Self
Set requires_full_context flag.
Sourcepub fn with_may_break_tests(self, value: bool) -> Self
pub fn with_may_break_tests(self, value: bool) -> Self
Set may_break_tests flag.
Sourcepub fn with_requires_compilation(self, value: bool) -> Self
pub fn with_requires_compilation(self, value: bool) -> Self
Set requires_compilation flag.
Sourcepub fn for_function_delete(is_public: bool) -> Self
pub fn for_function_delete(is_public: bool) -> Self
Convenience constructor for function deletion.
§Arguments
is_public- Whether the function is publicly visible
Sourcepub fn for_struct_modify(is_public: bool) -> Self
pub fn for_struct_modify(is_public: bool) -> Self
Convenience constructor for struct modification.
§Arguments
is_public- Whether the struct is publicly visible
Sourcepub fn for_body_replace() -> Self
pub fn for_body_replace() -> Self
Convenience constructor for body replacement.
Body replacements are generally safe - they don’t change signatures or types, so they won’t break tests and don’t require full context.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolHints
impl<'de> Deserialize<'de> for ToolHints
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ToolHints
impl StructuralPartialEq for ToolHints
Auto Trait Implementations§
impl Freeze for ToolHints
impl RefUnwindSafe for ToolHints
impl Send for ToolHints
impl Sync for ToolHints
impl Unpin for ToolHints
impl UnwindSafe for ToolHints
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more