pub enum AreaRule {
Contains(RegexIR),
NotContains(RegexIR),
Before(RegexIR),
After(RegexIR),
CursorAtBegin,
CursorAtEnd,
FindByLua(PathBuf),
FindByRhai(PathBuf),
FindBySh(PathBuf),
}
Expand description
Rule for patch area and cursor position definition.
Variants§
Contains(RegexIR)
Select given file to patch only if it contains some expression.
NotContains(RegexIR)
Select given file to patch only if it doesn’t contain some expression.
Before(RegexIR)
Crops patch area to the beginning of some expression and sets cursor to the end.
After(RegexIR)
Crops patch area to the ending of some expression and sets cursor to the beginning.
CursorAtBegin
Explicitly sets cursor to the beginning.
CursorAtEnd
Explicitly sets cursor to the end.
FindByLua(PathBuf)
Find patch area by Lua script.
FindByRhai(PathBuf)
Find patch area by Rhai script.
FindBySh(PathBuf)
Find patch area by shell script.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AreaRule
impl<'de> Deserialize<'de> for AreaRule
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for AreaRule
Auto Trait Implementations§
impl Freeze for AreaRule
impl RefUnwindSafe for AreaRule
impl Send for AreaRule
impl Sync for AreaRule
impl Unpin for AreaRule
impl UnwindSafe for AreaRule
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