pub struct ClrConstantPool {
pub strings: HashMap<String, u32>,
pub blobs: HashMap<Vec<u8>, u32>,
pub guids: HashMap<[u8; 16], u32>,
pub user_strings: HashMap<String, u32>,
}Expand description
CLR 常量池,用于存储各种元数据
Fields§
§strings: HashMap<String, u32>字符串池 (#Strings)
blobs: HashMap<Vec<u8>, u32>二进制大对象池 (#Blob)
guids: HashMap<[u8; 16], u32>GUID 池 (#GUID)
user_strings: HashMap<String, u32>用户字符串池 (#US)
Implementations§
Source§impl ClrConstantPool
impl ClrConstantPool
Sourcepub fn add_string(&mut self, s: String) -> u32
pub fn add_string(&mut self, s: String) -> u32
添加字符串到字符串池
Sourcepub fn add_user_string(&mut self, s: String) -> u32
pub fn add_user_string(&mut self, s: String) -> u32
添加用户字符串到用户字符串池
Trait Implementations§
Source§impl Clone for ClrConstantPool
impl Clone for ClrConstantPool
Source§fn clone(&self) -> ClrConstantPool
fn clone(&self) -> ClrConstantPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClrConstantPool
impl Debug for ClrConstantPool
Source§impl Default for ClrConstantPool
impl Default for ClrConstantPool
Source§fn default() -> ClrConstantPool
fn default() -> ClrConstantPool
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClrConstantPool
impl RefUnwindSafe for ClrConstantPool
impl Send for ClrConstantPool
impl Sync for ClrConstantPool
impl Unpin for ClrConstantPool
impl UnsafeUnpin for ClrConstantPool
impl UnwindSafe for ClrConstantPool
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