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 constant pool for storing various metadata.
Fields§
§strings: HashMap<String, u32>String pool (#Strings heap).
blobs: HashMap<Vec<u8>, u32>Binary large object pool (#Blob heap).
guids: HashMap<[u8; 16], u32>GUID pool (#GUID heap).
user_strings: HashMap<String, u32>User string pool (#US heap).
Implementations§
Source§impl ClrConstantPool
impl ClrConstantPool
Sourcepub fn add_string(&mut self, s: String) -> u32
pub fn add_string(&mut self, s: String) -> u32
Adds a string to the string pool and returns its index.
Sourcepub fn add_blob(&mut self, b: Vec<u8>) -> u32
pub fn add_blob(&mut self, b: Vec<u8>) -> u32
Adds a binary blob to the blob pool and returns its index.
Sourcepub fn add_guid(&mut self, g: [u8; 16]) -> u32
pub fn add_guid(&mut self, g: [u8; 16]) -> u32
Adds a GUID to the GUID pool and returns its index.
Sourcepub fn add_user_string(&mut self, s: String) -> u32
pub fn add_user_string(&mut self, s: String) -> u32
Adds a user string to the user string pool and returns its index.
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