1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! The metadata entries of a module: types, members, references and the
//! rest, each held in a shared [`Entry`] handle.
//!
//! Entries point at each other directly (a method's [`Method::declaring_type`],
//! a type's [`TypeDef::extends`], an IL operand's member), so walking a module
//! is following fields. [`Entry::get`] borrows an entry to read it and
//! [`Entry::get_mut`] to change it; changes are seen through every handle.
//!
//! ```no_run
//! use hao::prelude::*;
//!
//! let module = Module::from_path("Example.dll")?;
//! let ty = module.find_type("Example", "Player").expect("no such type");
//!
//! for field in &ty.get().fields {
//! let field = field.get();
//! println!("{} {:?}", field.name, field.signature.ty);
//! }
//! for method in &ty.get().methods {
//! let parent = method.get().declaring_type.upgrade().unwrap();
//! assert_eq!(parent, ty);
//! if method.get().name == "TakeDamage" {
//! // Edits go through the shared handle.
//! method.get_mut().name = "TakeDamageOriginal".into();
//! }
//! }
//! # Ok::<(), hao::error::HaoError>(())
//! ```
//!
//! [`well_known`] names common .NET types and methods without strings.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use ;