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 new(name: &str) -> Self
Sourcepub fn set_reference(&mut self, reference: Index)
pub fn set_reference(&mut self, reference: Index)
Sets the reference index used to resolve external TypeRef scopes.
pub fn reference(&self) -> Option<&Index>
pub fn ImplMap( &mut self, method: MethodDef, flags: PInvokeAttributes, import_name: &str, import_scope: &str, )
pub fn TypeDef( &mut self, namespace: &str, name: &str, extends: TypeDefOrRef, flags: TypeAttributes, ) -> TypeDef
pub fn TypeRef(&mut self, namespace: &str, name: &str) -> TypeRef
pub fn TypeSpec( &mut self, namespace: &str, name: &str, generics: &[Type], ) -> TypeSpec
pub fn Field(&mut self, name: &str, ty: &Type, flags: FieldAttributes) -> Field
pub fn MethodDef( &mut self, name: &str, signature: &Signature, flags: MethodAttributes, impl_flags: MethodImplAttributes, ) -> MethodDef
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 Property(&mut self, name: &str, ty: &Type) -> Property
pub fn Property(&mut self, name: &str, ty: &Type) -> Property
Adds a Property row to the file, returning the row offset.
Sourcepub fn PropertyMap(
&mut self,
parent: TypeDef,
property_list: Property,
) -> PropertyMap
pub fn PropertyMap( &mut self, parent: TypeDef, property_list: Property, ) -> PropertyMap
Adds a PropertyMap row associating a type with its first property.
Sourcepub fn Event(&mut self, name: &str, ty: &Type) -> Event
pub fn Event(&mut self, name: &str, ty: &Type) -> Event
Adds an Event row to the file, returning the row offset. ty is the event’s
handler delegate type.
Sourcepub fn EventMap(&mut self, parent: TypeDef, event_list: Event) -> EventMap
pub fn EventMap(&mut self, parent: TypeDef, event_list: Event) -> EventMap
Adds an EventMap row associating a type with its first event.
Sourcepub fn MethodSemantics(
&mut self,
semantics: u16,
method: MethodDef,
association: HasSemantics,
) -> MethodSemantics
pub fn MethodSemantics( &mut self, semantics: u16, method: MethodDef, association: HasSemantics, ) -> MethodSemantics
Adds a MethodSemantics row linking an accessor method to a property or event.
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 without assigning its sorted row offset.
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 FieldLayout(&mut self, field: Field, offset: 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 UnsafeUnpin 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