pub struct Rule {
pub pattern: Spanned<String>,
pub owners: Vec<Spanned<Owner>>,
pub leading_comments: Vec<Spanned<String>>,
pub trailing_comment: Option<Spanned<String>>,
}
Expand description
A parsed CODEOWNERS rule. Contains a pattern and a list of owners, along
with any comments that were found before or after the rule. All fields are
wrapped in Spanned
to preserve the original source location.
For most uses, the Rule
type should be converted into a ruleset::Rule
using the From
trait or the into_ruleset
method on ParseResult
. This
will remove the Spanned
wrappers and discard any comments.
Fields§
§pattern: Spanned<String>
§owners: Vec<Spanned<Owner>>
§leading_comments: Vec<Spanned<String>>
§trailing_comment: Option<Spanned<String>>
Trait Implementations§
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