pub enum ElementValue {
Constant {
tag: u8,
constant_index: u16,
origin: AttributeOrigin,
},
Enum {
type_name_index: u16,
constant_name_index: u16,
origin: AttributeOrigin,
},
Class {
class_info_index: u16,
origin: AttributeOrigin,
},
Annotation {
annotation: Box<Annotation>,
origin: AttributeOrigin,
},
Array {
values: Vec<ElementValue>,
origin: AttributeOrigin,
},
}Expand description
A JVM annotation element_value, with every constant-pool index left unresolved.
Variants§
Constant
Primitive or string constant (B, C, D, F, I, J, S, Z, or s).
Fields
§
origin: AttributeOriginSource range of the complete value.
Enum
Enum constant (e).
Fields
§
origin: AttributeOriginSource range of the complete value.
Class
Class literal (c).
Fields
§
origin: AttributeOriginSource range of the complete value.
Annotation
Nested annotation (@).
Fields
§
annotation: Box<Annotation>Nested annotation value.
§
origin: AttributeOriginSource range including the tag.
Array
Ordered annotation array ([).
Fields
§
values: Vec<ElementValue>Values in encoded order.
§
origin: AttributeOriginSource range of the complete array.
Implementations§
Source§impl ElementValue
impl ElementValue
Sourcepub fn origin(&self) -> AttributeOrigin
pub fn origin(&self) -> AttributeOrigin
Source range occupied by this value.
Trait Implementations§
Source§impl Clone for ElementValue
impl Clone for ElementValue
Source§fn clone(&self) -> ElementValue
fn clone(&self) -> ElementValue
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 ElementValue
impl Debug for ElementValue
impl Eq for ElementValue
Source§impl PartialEq for ElementValue
impl PartialEq for ElementValue
impl StructuralPartialEq for ElementValue
Auto Trait Implementations§
impl Freeze for ElementValue
impl RefUnwindSafe for ElementValue
impl Send for ElementValue
impl Sync for ElementValue
impl Unpin for ElementValue
impl UnsafeUnpin for ElementValue
impl UnwindSafe for ElementValue
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