pub struct Parameter {
pub name: String,
pub param_type: Type,
pub is_pointee_const: bool,
}Expand description
Represents a function parameter.
Fields§
§name: StringParameter name
param_type: TypeParameter type
is_pointee_const: boolWhether the pointee type is const (for pointer params like const char*)
DECY-135: Track const qualifier to enable const char* → &str transformation
Implementations§
Source§impl Parameter
impl Parameter
Sourcepub fn new_with_const(
name: String,
param_type: Type,
is_pointee_const: bool,
) -> Self
pub fn new_with_const( name: String, param_type: Type, is_pointee_const: bool, ) -> Self
Create a new parameter with const pointee information. DECY-135: Used for const char* parameters
Sourcepub fn is_function_pointer(&self) -> bool
pub fn is_function_pointer(&self) -> bool
Check if this parameter is a function pointer.
Sourcepub fn is_const_char_pointer(&self) -> bool
pub fn is_const_char_pointer(&self) -> bool
Check if this parameter is a const char pointer (const char*).
DECY-135: Now properly checks if pointee is const-qualified.
Returns true only for const char* parameters, not char*.
Sourcepub fn is_char_pointer(&self) -> bool
pub fn is_char_pointer(&self) -> bool
Check if this parameter is any char pointer (char* or const char*).
Trait Implementations§
impl StructuralPartialEq for Parameter
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnwindSafe for Parameter
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