pub struct CodeAttribute {
pub max_stack: u16,
pub max_locals: u16,
pub code: Vec<u8>,
pub exception_table: Vec<CodeException>,
pub attributes: Vec<NestedAttribute>,
}Expand description
The ordered, index-preserving body of a JVM Code attribute.
Fields§
§max_stack: u16Declared operand-stack bound.
max_locals: u16Declared local-variable bound.
code: Vec<u8>Exact bytecode array; instruction decoding remains a separate operation.
exception_table: Vec<CodeException>Exception handlers in classfile order.
attributes: Vec<NestedAttribute>Nested attributes in classfile order.
Implementations§
Source§impl CodeAttribute
impl CodeAttribute
Sourcepub fn decode(reader: &mut ByteReader<'_>) -> Result<Self, AttributeError>
pub fn decode(reader: &mut ByteReader<'_>) -> Result<Self, AttributeError>
Decode a complete Code payload, checking only its binary shape and allocation budget.
Trait Implementations§
Source§impl Clone for CodeAttribute
impl Clone for CodeAttribute
Source§fn clone(&self) -> CodeAttribute
fn clone(&self) -> CodeAttribute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CodeAttribute
impl Debug for CodeAttribute
impl Eq for CodeAttribute
Source§impl PartialEq for CodeAttribute
impl PartialEq for CodeAttribute
impl StructuralPartialEq for CodeAttribute
Auto Trait Implementations§
impl Freeze for CodeAttribute
impl RefUnwindSafe for CodeAttribute
impl Send for CodeAttribute
impl Sync for CodeAttribute
impl Unpin for CodeAttribute
impl UnsafeUnpin for CodeAttribute
impl UnwindSafe for CodeAttribute
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