pub struct FieldInfo<'a> {
pub access_flags: FieldAccessFlags,
pub name_index: CpIndex,
pub descriptor_index: CpIndex,
pub attributes: Vec<AttributeInfo<'a>>,
}Expand description
A single field of a class.
See JVMS §4.5.
Fields§
§access_flags: FieldAccessFlags§name_index: CpIndex§descriptor_index: CpIndex§attributes: Vec<AttributeInfo<'a>>Implementations§
Source§impl<'a> FieldInfo<'a>
impl<'a> FieldInfo<'a>
Sourcepub fn try_read(
constant_pool: &ConstantPool<'a>,
cursor: &mut Cursor<'a>,
) -> Result<Self>
pub fn try_read( constant_pool: &ConstantPool<'a>, cursor: &mut Cursor<'a>, ) -> Result<Self>
Reads one field, validating its constant pool references.
Sourcepub fn signature(
&self,
constant_pool: &ConstantPool<'a>,
) -> Result<Option<Cow<'a, str>>>
pub fn signature( &self, constant_pool: &ConstantPool<'a>, ) -> Result<Option<Cow<'a, str>>>
Returns the generic signature from the Signature attribute, if present.
Sourcepub fn name(&self, constant_pool: &ConstantPool<'a>) -> Result<Cow<'a, str>>
pub fn name(&self, constant_pool: &ConstantPool<'a>) -> Result<Cow<'a, str>>
Returns the field name.
Sourcepub fn descriptor(
&self,
constant_pool: &ConstantPool<'a>,
) -> Result<Cow<'a, str>>
pub fn descriptor( &self, constant_pool: &ConstantPool<'a>, ) -> Result<Cow<'a, str>>
Returns the field type descriptor.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FieldInfo<'a>
impl<'a> RefUnwindSafe for FieldInfo<'a>
impl<'a> Send for FieldInfo<'a>
impl<'a> Sync for FieldInfo<'a>
impl<'a> Unpin for FieldInfo<'a>
impl<'a> UnsafeUnpin for FieldInfo<'a>
impl<'a> UnwindSafe for FieldInfo<'a>
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