pub struct Field { /* private fields */ }Expand description
Represents the field of a class
Implementations§
Source§impl Field
impl Field
Sourcepub fn annotations(&self) -> &AnnotationSetItem
pub fn annotations(&self) -> &AnnotationSetItem
Annotations of the field.
Source§impl Field
impl Field
Sourcepub fn access_flags(&self) -> AccessFlags
pub fn access_flags(&self) -> AccessFlags
Access flags for the field.
Source§impl Field
impl Field
Sourcepub fn initial_value(&self) -> Option<&EncodedValue>
pub fn initial_value(&self) -> Option<&EncodedValue>
Initial value of the field. Always None for non-static fields.
If the value is None, it is not guaranteed that initial_value is null
at runtime. The field might be initialized in <clinit> method.
Sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true if the access flag is set
Sourcepub fn is_protected(&self) -> bool
pub fn is_protected(&self) -> bool
Returns true if the access flag is set
Sourcepub fn is_volatile(&self) -> bool
pub fn is_volatile(&self) -> bool
Returns true if the access flag is set
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Returns true if the access flag is set
Sourcepub fn is_synthetic(&self) -> bool
pub fn is_synthetic(&self) -> bool
Returns true if the access flag is set
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl !Send for Field
impl !Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
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