pub enum Constant {
Show 17 variants
Utf8(CodeUnitString),
Integer(u32),
Float(u32),
Long(u64),
Double(u64),
Class {
name_index: u16,
},
String {
string_index: u16,
},
Fieldref {
class_index: u16,
name_and_type_index: u16,
},
Methodref {
class_index: u16,
name_and_type_index: u16,
},
InterfaceMethodref {
class_index: u16,
name_and_type_index: u16,
},
NameAndType {
name_index: u16,
descriptor_index: u16,
},
MethodHandle {
reference_kind: u8,
reference_index: u16,
},
MethodType {
descriptor_index: u16,
},
Dynamic {
bootstrap_method_attr_index: u16,
name_and_type_index: u16,
},
InvokeDynamic {
bootstrap_method_attr_index: u16,
name_and_type_index: u16,
},
Module {
name_index: u16,
},
Package {
name_index: u16,
},
}Expand description
One usable JVM constant-pool entry.
Variants§
Utf8(CodeUnitString)
A modified-UTF-8 string, represented without losing UTF-16 code units.
Integer(u32)
A signed int bit pattern.
Float(u32)
An IEEE 754 single-precision bit pattern.
Long(u64)
A signed long bit pattern.
Double(u64)
An IEEE 754 double-precision bit pattern.
Class
A class or interface name index.
String
A string contents index.
Fieldref
A field reference.
Fields
Methodref
A class method reference.
Fields
InterfaceMethodref
An interface method reference.
Fields
NameAndType
A name and descriptor pair.
Fields
MethodHandle
A direct method-handle reference.
Fields
MethodType
A method descriptor.
Dynamic
A dynamically computed constant.
Fields
InvokeDynamic
A dynamically selected call site.
Fields
Module
A module name.
Package
A package name.
Trait Implementations§
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Freeze for Constant
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnsafeUnpin for Constant
impl UnwindSafe for Constant
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