pub struct File { /* private fields */ }Expand description
Represents an ECMA-335 file in memory so that it can be built incrementally.
Implementations§
Source§impl File
impl File
pub fn ImplMap( &mut self, method: MethodDef, flags: PInvokeAttributes, import_name: &str, import_scope: &str, )
Sourcepub fn TypeDef(
&mut self,
namespace: &str,
name: &str,
extends: TypeDefOrRef,
flags: TypeAttributes,
) -> TypeDef
pub fn TypeDef( &mut self, namespace: &str, name: &str, extends: TypeDefOrRef, flags: TypeAttributes, ) -> TypeDef
Adds a TypeDef row to the file, returning the row offset.
Sourcepub fn TypeRef(&mut self, namespace: &str, name: &str) -> TypeRef
pub fn TypeRef(&mut self, namespace: &str, name: &str) -> TypeRef
Adds a TypeRef row to the file, returning the row offset.
pub fn TypeSpec( &mut self, namespace: &str, name: &str, generics: &[Type], ) -> TypeSpec
Sourcepub fn Field(&mut self, name: &str, ty: &Type, flags: FieldAttributes) -> Field
pub fn Field(&mut self, name: &str, ty: &Type, flags: FieldAttributes) -> Field
Adds a Field row to the file, returning the row offset.
Sourcepub fn MethodDef(
&mut self,
name: &str,
signature: &Signature,
flags: MethodAttributes,
impl_flags: MethodImplAttributes,
) -> MethodDef
pub fn MethodDef( &mut self, name: &str, signature: &Signature, flags: MethodAttributes, impl_flags: MethodImplAttributes, ) -> MethodDef
Adds a MethodDef row to the file, returning the row offset.
pub fn MemberRef( &mut self, name: &str, signature: &Signature, parent: MemberRefParent, ) -> MemberRef
Sourcepub fn Param(
&mut self,
name: &str,
sequence: u16,
flags: ParamAttributes,
) -> Param
pub fn Param( &mut self, name: &str, sequence: u16, flags: ParamAttributes, ) -> Param
Adds a Param row to the file, returning the row offset.
Sourcepub fn Attribute(
&mut self,
parent: HasAttribute,
ty: AttributeType,
value: &[(String, Value)],
)
pub fn Attribute( &mut self, parent: HasAttribute, ty: AttributeType, value: &[(String, Value)], )
Adds an Attribute row to the file. This is a sorted table so the row offset is not yet available.
pub fn Constant(&mut self, parent: HasConstant, value: &Value)
pub fn GenericParam( &mut self, name: &str, owner: TypeOrMethodDef, number: u16, flags: GenericParamAttributes, )
pub fn ClassLayout( &mut self, parent: TypeDef, packing_size: u16, class_size: u32, )
pub fn NestedClass(&mut self, inner: TypeDef, outer: TypeDef)
pub fn InterfaceImpl( &mut self, class: TypeDef, interface: &Type, ) -> InterfaceImpl
Trait Implementations§
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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