pub struct ConstantPool { /* private fields */ }Expand description
Minimal constant pool builder.
Implementations§
Source§impl ConstantPool
impl ConstantPool
pub fn new() -> Self
Sourcepub fn add(&mut self, entry: ConstantPoolEntry) -> u16
pub fn add(&mut self, entry: ConstantPoolEntry) -> u16
Add an entry and return its 1-based index.
Sourcepub fn entries(&self) -> &[ConstantPoolEntry]
pub fn entries(&self) -> &[ConstantPoolEntry]
All constant pool entries (1-indexed in the class file).
Trait Implementations§
Source§impl Clone for ConstantPool
impl Clone for ConstantPool
Source§fn clone(&self) -> ConstantPool
fn clone(&self) -> ConstantPool
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 ConstantPool
impl Debug for ConstantPool
Source§impl Default for ConstantPool
impl Default for ConstantPool
Source§fn default() -> ConstantPool
fn default() -> ConstantPool
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConstantPool
impl RefUnwindSafe for ConstantPool
impl Send for ConstantPool
impl Sync for ConstantPool
impl Unpin for ConstantPool
impl UnsafeUnpin for ConstantPool
impl UnwindSafe for ConstantPool
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