pub struct TypeDecl {
pub kind: TypeKind,
pub mods: String,
pub name: String,
pub ty_params: String,
pub header: String,
pub extends: Vec<String>,
pub implements: Vec<String>,
pub permits: Vec<String>,
pub enum_constants: Vec<String>,
pub members: Vec<Member>,
}Expand description
类型声明。
Fields§
§kind: TypeKind§mods: String修饰符 + 注解原文。
name: String§ty_params: String泛型参数原文(含尖括号,可为空串);record 的头部参数原文存在 header。
header: Stringrecord 组件头原文((int a, String b)),非 record 为空串。
extends: Vec<String>§implements: Vec<String>§permits: Vec<String>sealed 类型的 permits 子句原文列表(打印 permits A, B)。
enum_constants: Vec<String>枚举常量原文(解析失败时兜底保真)。
members: Vec<Member>Trait Implementations§
impl StructuralPartialEq for TypeDecl
Auto Trait Implementations§
impl Freeze for TypeDecl
impl RefUnwindSafe for TypeDecl
impl Send for TypeDecl
impl Sync for TypeDecl
impl Unpin for TypeDecl
impl UnsafeUnpin for TypeDecl
impl UnwindSafe for TypeDecl
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