pub struct GObjectVirtualMethodsChainUp;Trait Implementations§
Source§impl Rule for GObjectVirtualMethodsChainUp
impl Rule for GObjectVirtualMethodsChainUp
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
The unique identifier for this rule (e.g., “missing_implementation”)
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description of what this rule checks
Source§fn check_all(
&self,
ast_context: &AstContext,
config: &Config,
violations: &mut Vec<Violation>,
)
fn check_all( &self, ast_context: &AstContext, config: &Config, violations: &mut Vec<Violation>, )
Check the AST and add violations to the provided vector
Default implementation calls check_func_impl for C files,
check_func_decl for headers, and check_gobject_type for all files.
Override this if you need custom iteration logic beyond per-item
checking
Source§fn long_description(&self) -> Option<&'static str>
fn long_description(&self) -> Option<&'static str>
Long-form markdown documentation (optional)
Source§fn requires_meson(&self) -> bool
fn requires_meson(&self) -> bool
Whether this rule requires meson introspection to produce results.
Rules returning true silently skip when no build directory is found.
Source§fn config_options(&self) -> &'static [ConfigOption]
fn config_options(&self) -> &'static [ConfigOption]
Configuration options supported by this rule
Source§fn min_glib_version(&self) -> Option<(u32, u32)>
fn min_glib_version(&self) -> Option<(u32, u32)>
Minimum GLib version required by this rule.
None means no version requirement (compatible with all versions).Source§fn requires_auto_cleanup(&self) -> bool
fn requires_auto_cleanup(&self) -> bool
Whether this rule suggests g_auto* macros (disabled when
msvc_compatible=true)
Source§fn opt_in(&self) -> bool
fn opt_in(&self) -> bool
Whether this rule is disabled by default (user must explicitly enable
it)
Source§fn opt_in_reason(&self) -> Option<&'static str>
fn opt_in_reason(&self) -> Option<&'static str>
Why this rule is opt-in (only meaningful when opt_in() returns true)
Source§fn check_func_impl(
&self,
ast_context: &AstContext,
config: &Config,
func: &FunctionDefItem,
file: &FileModel,
violations: &mut Vec<Violation>,
)
fn check_func_impl( &self, ast_context: &AstContext, config: &Config, func: &FunctionDefItem, file: &FileModel, violations: &mut Vec<Violation>, )
Check a function implementation (from C files)
Override this to check function bodies and implementations
Source§fn check_func_decl(
&self,
ast_context: &AstContext,
config: &Config,
func: &FunctionDeclItem,
file: &FileModel,
violations: &mut Vec<Violation>,
)
fn check_func_decl( &self, ast_context: &AstContext, config: &Config, func: &FunctionDeclItem, file: &FileModel, violations: &mut Vec<Violation>, )
Check a function declaration (from header files)
Override this to check function declarations and signatures
Source§fn check_enum(
&self,
ast_context: &AstContext,
config: &Config,
enum_info: &EnumInfo,
file: &FileModel,
violations: &mut Vec<Violation>,
)
fn check_enum( &self, ast_context: &AstContext, config: &Config, enum_info: &EnumInfo, file: &FileModel, violations: &mut Vec<Violation>, )
Check an enum definition
Source§fn check_gobject_type(
&self,
ast_context: &AstContext,
config: &Config,
gobject_type: &GObjectType,
file: &FileModel,
violations: &mut Vec<Violation>,
)
fn check_gobject_type( &self, ast_context: &AstContext, config: &Config, gobject_type: &GObjectType, file: &FileModel, violations: &mut Vec<Violation>, )
Check a GObject type declaration/definition
Override this to check properties, signals, or other GObject-level
concerns
Source§fn check_function_renames(
&self,
func: &FunctionDefItem,
file: &FileModel,
config: &Config,
violations: &mut Vec<Violation>,
renames: &[FunctionRename],
)
fn check_function_renames( &self, func: &FunctionDefItem, file: &FileModel, config: &Config, violations: &mut Vec<Violation>, renames: &[FunctionRename], )
Find calls to functions listed in
renames and emit violations.
When to is Some, generates a fix that reformats the entire call.Source§fn violation(
&self,
file: &Path,
line: usize,
column: usize,
message: String,
) -> Violation
fn violation( &self, file: &Path, line: usize, column: usize, message: String, ) -> Violation
Helper to create a violation with the rule name automatically filled in
Source§fn violation_with_fix(
&self,
file: &Path,
line: usize,
column: usize,
message: String,
fix: Fix,
) -> Violation
fn violation_with_fix( &self, file: &Path, line: usize, column: usize, message: String, fix: Fix, ) -> Violation
Helper to create a violation with an automated fix
Source§fn violation_with_fixes(
&self,
file: &Path,
line: usize,
column: usize,
message: String,
fixes: Vec<Fix>,
) -> Violation
fn violation_with_fixes( &self, file: &Path, line: usize, column: usize, message: String, fixes: Vec<Fix>, ) -> Violation
Helper to create a violation with multiple automated fixes
fn violation_at( &self, file: &Path, location: &SourceLocation, message: String, ) -> Violation
fn violation_with_fix_at( &self, file: &Path, location: &SourceLocation, message: String, fix: Fix, ) -> Violation
fn violation_with_fixes_at( &self, file: &Path, location: &SourceLocation, message: String, fixes: Vec<Fix>, ) -> Violation
Auto Trait Implementations§
impl Freeze for GObjectVirtualMethodsChainUp
impl RefUnwindSafe for GObjectVirtualMethodsChainUp
impl Send for GObjectVirtualMethodsChainUp
impl Sync for GObjectVirtualMethodsChainUp
impl Unpin for GObjectVirtualMethodsChainUp
impl UnsafeUnpin for GObjectVirtualMethodsChainUp
impl UnwindSafe for GObjectVirtualMethodsChainUp
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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