pub struct CilClass {Show 14 fields
pub name: String,
pub namespace: String,
pub fields: Vec<CilField>,
pub methods: Vec<CilMethod>,
pub interfaces: Vec<CilType>,
pub base_type: Option<CilType>,
pub is_value_type: bool,
pub is_abstract: bool,
pub is_sealed: bool,
pub is_interface: bool,
pub visibility: CilVisibility,
pub type_params: Vec<String>,
pub custom_attrs: Vec<String>,
pub nested: Vec<CilClass>,
}Expand description
A CIL class definition.
Fields§
§name: String§namespace: String§fields: Vec<CilField>§methods: Vec<CilMethod>§interfaces: Vec<CilType>§base_type: Option<CilType>§is_value_type: bool§is_abstract: bool§is_sealed: bool§is_interface: bool§visibility: CilVisibility§type_params: Vec<String>§custom_attrs: Vec<String>§nested: Vec<CilClass>Implementations§
Source§impl CilClass
impl CilClass
Sourcepub fn new(namespace: impl Into<String>, name: impl Into<String>) -> Self
pub fn new(namespace: impl Into<String>, name: impl Into<String>) -> Self
Create a new public class.
Sourcepub fn add_method(&mut self, method: CilMethod)
pub fn add_method(&mut self, method: CilMethod)
Add a method.
Sourcepub fn add_nested(&mut self, nested: CilClass)
pub fn add_nested(&mut self, nested: CilClass)
Add a nested class.
Sourcepub fn find_method(&self, name: &str) -> Option<&CilMethod>
pub fn find_method(&self, name: &str) -> Option<&CilMethod>
Find a method by name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CilClass
impl RefUnwindSafe for CilClass
impl Send for CilClass
impl Sync for CilClass
impl Unpin for CilClass
impl UnsafeUnpin for CilClass
impl UnwindSafe for CilClass
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