Make header a vec of modifiers, make FunctionPointer consistent with Function and Method.
This commit is contained in:
@@ -281,11 +281,20 @@ pub enum StructType {
|
||||
Unit,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub enum Modifiers {
|
||||
Const,
|
||||
Unsafe,
|
||||
Async,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub struct Function {
|
||||
pub decl: FnDecl,
|
||||
pub generics: Generics,
|
||||
pub header: String,
|
||||
pub header: Vec<Modifiers>,
|
||||
pub abi: String,
|
||||
}
|
||||
|
||||
@@ -293,7 +302,7 @@ pub struct Function {
|
||||
pub struct Method {
|
||||
pub decl: FnDecl,
|
||||
pub generics: Generics,
|
||||
pub header: String,
|
||||
pub header: Vec<Modifiers>,
|
||||
pub abi: String,
|
||||
pub has_body: bool,
|
||||
}
|
||||
@@ -404,9 +413,9 @@ pub enum Type {
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub struct FunctionPointer {
|
||||
pub is_unsafe: bool,
|
||||
pub generic_params: Vec<GenericParamDef>,
|
||||
pub decl: FnDecl,
|
||||
pub generic_params: Vec<GenericParamDef>,
|
||||
pub header: Vec<Modifiers>,
|
||||
pub abi: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user