Enum classfmt::constant_pool::Constant[][src]

pub enum Constant<'c> {
Show variants Class { tag: ConstantTag, name_index: u16, }, Fieldref { tag: ConstantTag, class_index: u16, name_and_type_index: u16, }, Methodref { tag: ConstantTag, class_index: u16, name_and_type_index: u16, }, InterfaceMethodref { tag: ConstantTag, class_index: u16, name_and_type_index: u16, }, String { tag: ConstantTag, string_index: u16, }, Integer { tag: ConstantTag, value: i32, }, Float { tag: ConstantTag, bytes: &'c [u8], }, Long { tag: ConstantTag, high_bytes: u32, low_bytes: u32, }, Double { tag: ConstantTag, high_bytes: u32, low_bytes: u32, }, NameAndType { tag: ConstantTag, name_index: u16, descriptor_index: u16, }, Utf8 { tag: ConstantTag, length: u16, bytes: &'c [u8], }, MethodHandle { tag: ConstantTag, reference_kind: ReferenceKind, reference_index: u16, }, MethodType { tag: ConstantTag, descriptor_index: u16, }, InvokeDynamic { tag: ConstantTag, bootstrap_method_attr_index: u16, name_index: u16, },
}
Expand description

Represents a constant pool element
See https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4 for more info

Variants

Class
Show fields

Fields of Class

tag: ConstantTagname_index: u16
Fieldref
Show fields

Fields of Fieldref

tag: ConstantTagclass_index: u16name_and_type_index: u16
Methodref
Show fields

Fields of Methodref

tag: ConstantTagclass_index: u16name_and_type_index: u16
InterfaceMethodref
Show fields

Fields of InterfaceMethodref

tag: ConstantTagclass_index: u16name_and_type_index: u16
String
Show fields

Fields of String

tag: ConstantTagstring_index: u16
Integer
Show fields

Fields of Integer

tag: ConstantTagvalue: i32
Float
Show fields

Fields of Float

tag: ConstantTagbytes: &'c [u8]
Long
Show fields

Fields of Long

tag: ConstantTaghigh_bytes: u32low_bytes: u32
Double
Show fields

Fields of Double

tag: ConstantTaghigh_bytes: u32low_bytes: u32
NameAndType
Show fields

Fields of NameAndType

tag: ConstantTagname_index: u16descriptor_index: u16
Utf8
Show fields

Fields of Utf8

tag: ConstantTaglength: u16bytes: &'c [u8]
MethodHandle
Show fields

Fields of MethodHandle

tag: ConstantTagreference_kind: ReferenceKindreference_index: u16
MethodType
Show fields

Fields of MethodType

tag: ConstantTagdescriptor_index: u16
InvokeDynamic
Show fields

Fields of InvokeDynamic

tag: ConstantTagbootstrap_method_attr_index: u16name_index: u16

Trait Implementations

impl<'c> Debug for Constant<'c>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'c> RefUnwindSafe for Constant<'c>

impl<'c> Send for Constant<'c>

impl<'c> Sync for Constant<'c>

impl<'c> Unpin for Constant<'c>

impl<'c> UnwindSafe for Constant<'c>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.