pub enum Rule {
EOI,
WHITESPACE,
controller_file,
mapping_annotation,
mapping_args,
identifier,
class_decl,
method,
controller_annotation,
controller_block,
}Variants§
EOI
End-of-input
WHITESPACE
Rule to skip all spaces, tabs, newlines
controller_file
It can parse zero or more controller_blocks and ensures is starts from SOI and ends in EOI
mapping_annotation
Matches any Spring mapping annotation, such as:
@RequestMapping
@GetMapping
@PostMapping
@DeleteMapping
@PatchMapping
@PutMapping
They may contain mapping argument
mapping_args
Matches the arguments inside parentheses of a mapping annotation.
identifier
Matches a valid Java identifier Allows ASCII alphanumeric characters and underscores
class_decl
Matches a basic Java class declaration
Captures the keyword class followed by an identifier
method
Matches a Java method including its header and body. This Includes:
- A visibility modifier
- A method signature
- A method body
controller_annotation
Matches controller-level annotations:
@Controller@RestController
controller_block
Matches a full Spring controller class definition. Controller block consists of:
- A controller annotation
- Optional mapping annotations for the class
- The class declaration
- Zero or more methods
Implementations§
Trait Implementations§
Source§impl Ord for Rule
impl Ord for Rule
Source§impl PartialOrd for Rule
impl PartialOrd for Rule
impl Copy for Rule
impl Eq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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