pub struct Resolution<'a> {
pub assembly: Option<Assembly<'a>>,
pub assembly_references: Vec<ExternalAssemblyReference<'a>>,
pub entry_point: Option<EntryPoint>,
pub exported_types: Vec<ExportedType<'a>>,
pub field_references: Vec<ExternalFieldReference<'a>>,
pub files: Vec<File<'a>>,
pub manifest_resources: Vec<ManifestResource<'a>>,
pub method_references: Vec<ExternalMethodReference<'a>>,
pub module: Module<'a>,
pub module_references: Vec<ExternalModuleReference<'a>>,
pub type_definitions: Vec<TypeDefinition<'a>>,
pub type_references: Vec<ExternalTypeReference<'a>>,
}Expand description
A structured representation of a .NET DLL file’s metadata, according to the ECMA-335 standard.
Resolution is the top-level data structure of dotnetdll.
By working with a Resolution instance, you can access all the details of the assembly, modules, types, and other members defined or referenced in a DLL.
Fields§
§assembly: Option<Assembly<'a>>Assembly metadata, if the DLL defines an assembly.
assembly_references: Vec<ExternalAssemblyReference<'a>>All external assemblies referenced by the DLL.
entry_point: Option<EntryPoint>Entry point for the DLL, if one is defined.
exported_types: Vec<ExportedType<'a>>Types that this assembly exports, but are not defined in the assembly’s main module.
field_references: Vec<ExternalFieldReference<'a>>References to fields defined in external assemblies.
files: Vec<File<'a>>File resources that the DLL references or contains.
manifest_resources: Vec<ManifestResource<'a>>Resources embedded within the DLL.
method_references: Vec<ExternalMethodReference<'a>>References to methods defined in external assemblies.
module: Module<'a>The module defined by the DLL. Note that this is a distinct object from an assembly.
module_references: Vec<ExternalModuleReference<'a>>References to modules defined in external assemblies.
type_definitions: Vec<TypeDefinition<'a>>Types defined within the DLL.
type_references: Vec<ExternalTypeReference<'a>>References to types defined in external assemblies.
Implementations§
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn new(module: Module<'a>) -> Self
pub fn parse(bytes: &'a [u8], opts: ReadOptions) -> Result<Self>
pub fn write(&self, opts: WriteOptions) -> Result<Vec<u8>>
pub fn set_entry_point(&mut self, entry_point: impl Into<EntryPoint>)
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_assembly_reference( &mut self, val: ExternalAssemblyReference<'a>, ) -> AssemblyRefIndex
pub fn assembly_reference_index(&self, index: usize) -> Option<AssemblyRefIndex>
pub fn enumerate_assembly_references( &self, ) -> impl Iterator<Item = (AssemblyRefIndex, &ExternalAssemblyReference<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_exported_type(&mut self, val: ExportedType<'a>) -> ExportedTypeIndex
pub fn exported_type_index(&self, index: usize) -> Option<ExportedTypeIndex>
pub fn enumerate_exported_types( &self, ) -> impl Iterator<Item = (ExportedTypeIndex, &ExportedType<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_field_reference( &mut self, val: ExternalFieldReference<'a>, ) -> FieldRefIndex
pub fn field_reference_index(&self, index: usize) -> Option<FieldRefIndex>
pub fn enumerate_field_references( &self, ) -> impl Iterator<Item = (FieldRefIndex, &ExternalFieldReference<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_method_reference( &mut self, val: ExternalMethodReference<'a>, ) -> MethodRefIndex
pub fn method_reference_index(&self, index: usize) -> Option<MethodRefIndex>
pub fn enumerate_method_references( &self, ) -> impl Iterator<Item = (MethodRefIndex, &ExternalMethodReference<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_module_reference( &mut self, val: ExternalModuleReference<'a>, ) -> ModuleRefIndex
pub fn module_reference_index(&self, index: usize) -> Option<ModuleRefIndex>
pub fn enumerate_module_references( &self, ) -> impl Iterator<Item = (ModuleRefIndex, &ExternalModuleReference<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_type_definition(&mut self, val: TypeDefinition<'a>) -> TypeIndex
pub fn type_definition_index(&self, index: usize) -> Option<TypeIndex>
pub fn enumerate_type_definitions( &self, ) -> impl Iterator<Item = (TypeIndex, &TypeDefinition<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_type_reference( &mut self, val: ExternalTypeReference<'a>, ) -> TypeRefIndex
pub fn type_reference_index(&self, index: usize) -> Option<TypeRefIndex>
pub fn enumerate_type_references( &self, ) -> impl Iterator<Item = (TypeRefIndex, &ExternalTypeReference<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_field(&mut self, parent: TypeIndex, field: Field<'a>) -> FieldIndex
pub fn field_index(&self, parent: TypeIndex, index: usize) -> Option<FieldIndex>
pub fn enumerate_fields( &self, parent: TypeIndex, ) -> impl Iterator<Item = (FieldIndex, &Field<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_property( &mut self, parent: TypeIndex, property: Property<'a>, ) -> PropertyIndex
pub fn property_index( &self, parent: TypeIndex, index: usize, ) -> Option<PropertyIndex>
pub fn enumerate_properties( &self, parent: TypeIndex, ) -> impl Iterator<Item = (PropertyIndex, &Property<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_event(&mut self, parent: TypeIndex, event: Event<'a>) -> EventIndex
pub fn event_index(&self, parent: TypeIndex, index: usize) -> Option<EventIndex>
pub fn enumerate_events( &self, parent: TypeIndex, ) -> impl Iterator<Item = (EventIndex, &Event<'a>)>
Source§impl<'a> Resolution<'a>
impl<'a> Resolution<'a>
pub fn push_method( &mut self, parent: TypeIndex, method: Method<'a>, ) -> MethodIndex
pub fn method_index( &self, parent: TypeIndex, index: usize, ) -> Option<MethodIndex>
pub fn enumerate_methods( &self, parent: TypeIndex, ) -> impl Iterator<Item = (MethodIndex, &Method<'a>)>
pub fn set_property_getter( &mut self, property: PropertyIndex, method: Method<'a>, ) -> MethodIndex
pub fn property_getter_index( &self, property: PropertyIndex, ) -> Option<MethodIndex>
pub fn set_property_setter( &mut self, property: PropertyIndex, method: Method<'a>, ) -> MethodIndex
pub fn property_setter_index( &self, property: PropertyIndex, ) -> Option<MethodIndex>
pub fn push_property_other( &mut self, property: PropertyIndex, method: Method<'a>, ) -> MethodIndex
pub fn property_other_index( &self, property: PropertyIndex, index: usize, ) -> Option<MethodIndex>
pub fn event_add_index(&self, event: EventIndex) -> MethodIndex
pub fn event_remove_index(&self, event: EventIndex) -> MethodIndex
pub fn set_event_raise( &mut self, event: EventIndex, method: Method<'a>, ) -> MethodIndex
pub fn event_raise_index(&self, event: EventIndex) -> Option<MethodIndex>
pub fn push_event_other( &mut self, event: EventIndex, method: Method<'a>, ) -> MethodIndex
pub fn event_other_index( &self, event: EventIndex, index: usize, ) -> Option<MethodIndex>
Trait Implementations§
Source§impl<'a> Clone for Resolution<'a>
impl<'a> Clone for Resolution<'a>
Source§fn clone(&self) -> Resolution<'a>
fn clone(&self) -> Resolution<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for Resolution<'a>
impl<'a> Debug for Resolution<'a>
Source§impl<'a> Index<AssemblyRefIndex> for Resolution<'a>
impl<'a> Index<AssemblyRefIndex> for Resolution<'a>
Source§type Output = ExternalAssemblyReference<'a>
type Output = ExternalAssemblyReference<'a>
Source§impl<'a> Index<EventIndex> for Resolution<'a>
impl<'a> Index<EventIndex> for Resolution<'a>
Source§impl<'a> Index<ExportedTypeIndex> for Resolution<'a>
impl<'a> Index<ExportedTypeIndex> for Resolution<'a>
Source§type Output = ExportedType<'a>
type Output = ExportedType<'a>
Source§impl<'a> Index<FieldIndex> for Resolution<'a>
impl<'a> Index<FieldIndex> for Resolution<'a>
Source§impl<'a> Index<FieldRefIndex> for Resolution<'a>
impl<'a> Index<FieldRefIndex> for Resolution<'a>
Source§type Output = ExternalFieldReference<'a>
type Output = ExternalFieldReference<'a>
Source§impl<'a> Index<FileIndex> for Resolution<'a>
impl<'a> Index<FileIndex> for Resolution<'a>
Source§impl<'a> Index<MethodIndex> for Resolution<'a>
impl<'a> Index<MethodIndex> for Resolution<'a>
Source§impl<'a> Index<MethodRefIndex> for Resolution<'a>
impl<'a> Index<MethodRefIndex> for Resolution<'a>
Source§type Output = ExternalMethodReference<'a>
type Output = ExternalMethodReference<'a>
Source§impl<'a> Index<ModuleRefIndex> for Resolution<'a>
impl<'a> Index<ModuleRefIndex> for Resolution<'a>
Source§type Output = ExternalModuleReference<'a>
type Output = ExternalModuleReference<'a>
Source§impl<'a> Index<PropertyIndex> for Resolution<'a>
impl<'a> Index<PropertyIndex> for Resolution<'a>
Source§impl<'a> Index<TypeIndex> for Resolution<'a>
impl<'a> Index<TypeIndex> for Resolution<'a>
Source§impl<'a> Index<TypeRefIndex> for Resolution<'a>
impl<'a> Index<TypeRefIndex> for Resolution<'a>
Source§type Output = ExternalTypeReference<'a>
type Output = ExternalTypeReference<'a>
Source§impl<'a> IndexMut<AssemblyRefIndex> for Resolution<'a>
impl<'a> IndexMut<AssemblyRefIndex> for Resolution<'a>
Source§impl<'a> IndexMut<EventIndex> for Resolution<'a>
impl<'a> IndexMut<EventIndex> for Resolution<'a>
Source§impl<'a> IndexMut<ExportedTypeIndex> for Resolution<'a>
impl<'a> IndexMut<ExportedTypeIndex> for Resolution<'a>
Source§impl<'a> IndexMut<FieldIndex> for Resolution<'a>
impl<'a> IndexMut<FieldIndex> for Resolution<'a>
Source§impl<'a> IndexMut<FieldRefIndex> for Resolution<'a>
impl<'a> IndexMut<FieldRefIndex> for Resolution<'a>
Source§impl<'a> IndexMut<FileIndex> for Resolution<'a>
impl<'a> IndexMut<FileIndex> for Resolution<'a>
Source§impl IndexMut<MethodIndex> for Resolution<'_>
impl IndexMut<MethodIndex> for Resolution<'_>
Source§impl<'a> IndexMut<MethodRefIndex> for Resolution<'a>
impl<'a> IndexMut<MethodRefIndex> for Resolution<'a>
Source§impl<'a> IndexMut<ModuleRefIndex> for Resolution<'a>
impl<'a> IndexMut<ModuleRefIndex> for Resolution<'a>
Source§impl<'a> IndexMut<PropertyIndex> for Resolution<'a>
impl<'a> IndexMut<PropertyIndex> for Resolution<'a>
Source§impl<'a> IndexMut<TypeIndex> for Resolution<'a>
impl<'a> IndexMut<TypeIndex> for Resolution<'a>
Source§impl<'a> IndexMut<TypeRefIndex> for Resolution<'a>
impl<'a> IndexMut<TypeRefIndex> for Resolution<'a>
Auto Trait Implementations§
impl<'a> Freeze for Resolution<'a>
impl<'a> RefUnwindSafe for Resolution<'a>
impl<'a> Send for Resolution<'a>
impl<'a> Sync for Resolution<'a>
impl<'a> Unpin for Resolution<'a>
impl<'a> UnwindSafe for Resolution<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.