Enum parse::pool::ConstantEntry
source · pub enum ConstantEntry {
Show 17 variants
Class(ConstantClass),
Field(ConstantField),
Method(ConstantMethod),
InterfaceMethod(ConstantInterfaceMethod),
String(ConstantString),
Integer(ConstantInteger),
Float(ConstantFloat),
Long(ConstantLong),
Double(ConstantDouble),
NameAndType(ConstantNameAndType),
Utf8(ConstantUtf8),
MethodHandle(ConstantMethodHandle),
MethodType(ConstantMethodType),
Dynamic(ConstantDynamic),
InvokeDynamic(ConstantInvokeDynamic),
Package(ConstantPackage),
Reserved,
}
Variants§
Class(ConstantClass)
Field(ConstantField)
Method(ConstantMethod)
InterfaceMethod(ConstantInterfaceMethod)
String(ConstantString)
Integer(ConstantInteger)
Float(ConstantFloat)
Long(ConstantLong)
Double(ConstantDouble)
NameAndType(ConstantNameAndType)
Utf8(ConstantUtf8)
MethodHandle(ConstantMethodHandle)
MethodType(ConstantMethodType)
Dynamic(ConstantDynamic)
InvokeDynamic(ConstantInvokeDynamic)
Package(ConstantPackage)
Reserved
Implementations§
source§impl ConstantEntry
impl ConstantEntry
sourcepub fn as_class_mut(&mut self) -> Option<&mut ConstantClass>
pub fn as_class_mut(&mut self) -> Option<&mut ConstantClass>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Class
, otherwise None
sourcepub fn as_class(&self) -> Option<&ConstantClass>
pub fn as_class(&self) -> Option<&ConstantClass>
Optionally returns references to the inner fields if this is a ConstantEntry::Class
, otherwise None
sourcepub fn into_class(self) -> Result<ConstantClass, Self>
pub fn into_class(self) -> Result<ConstantClass, Self>
Returns the inner fields if this is a ConstantEntry::Class
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_field_mut(&mut self) -> Option<&mut ConstantField>
pub fn as_field_mut(&mut self) -> Option<&mut ConstantField>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Field
, otherwise None
sourcepub fn as_field(&self) -> Option<&ConstantField>
pub fn as_field(&self) -> Option<&ConstantField>
Optionally returns references to the inner fields if this is a ConstantEntry::Field
, otherwise None
sourcepub fn into_field(self) -> Result<ConstantField, Self>
pub fn into_field(self) -> Result<ConstantField, Self>
Returns the inner fields if this is a ConstantEntry::Field
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_method_mut(&mut self) -> Option<&mut ConstantMethod>
pub fn as_method_mut(&mut self) -> Option<&mut ConstantMethod>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Method
, otherwise None
sourcepub fn as_method(&self) -> Option<&ConstantMethod>
pub fn as_method(&self) -> Option<&ConstantMethod>
Optionally returns references to the inner fields if this is a ConstantEntry::Method
, otherwise None
sourcepub fn into_method(self) -> Result<ConstantMethod, Self>
pub fn into_method(self) -> Result<ConstantMethod, Self>
Returns the inner fields if this is a ConstantEntry::Method
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_interface_method_mut(
&mut self
) -> Option<&mut ConstantInterfaceMethod>
pub fn as_interface_method_mut( &mut self ) -> Option<&mut ConstantInterfaceMethod>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::InterfaceMethod
, otherwise None
sourcepub fn as_interface_method(&self) -> Option<&ConstantInterfaceMethod>
pub fn as_interface_method(&self) -> Option<&ConstantInterfaceMethod>
Optionally returns references to the inner fields if this is a ConstantEntry::InterfaceMethod
, otherwise None
sourcepub fn into_interface_method(self) -> Result<ConstantInterfaceMethod, Self>
pub fn into_interface_method(self) -> Result<ConstantInterfaceMethod, Self>
Returns the inner fields if this is a ConstantEntry::InterfaceMethod
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_string_mut(&mut self) -> Option<&mut ConstantString>
pub fn as_string_mut(&mut self) -> Option<&mut ConstantString>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::String
, otherwise None
sourcepub fn as_string(&self) -> Option<&ConstantString>
pub fn as_string(&self) -> Option<&ConstantString>
Optionally returns references to the inner fields if this is a ConstantEntry::String
, otherwise None
sourcepub fn into_string(self) -> Result<ConstantString, Self>
pub fn into_string(self) -> Result<ConstantString, Self>
Returns the inner fields if this is a ConstantEntry::String
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_integer_mut(&mut self) -> Option<&mut ConstantInteger>
pub fn as_integer_mut(&mut self) -> Option<&mut ConstantInteger>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Integer
, otherwise None
sourcepub fn as_integer(&self) -> Option<&ConstantInteger>
pub fn as_integer(&self) -> Option<&ConstantInteger>
Optionally returns references to the inner fields if this is a ConstantEntry::Integer
, otherwise None
sourcepub fn into_integer(self) -> Result<ConstantInteger, Self>
pub fn into_integer(self) -> Result<ConstantInteger, Self>
Returns the inner fields if this is a ConstantEntry::Integer
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_float_mut(&mut self) -> Option<&mut ConstantFloat>
pub fn as_float_mut(&mut self) -> Option<&mut ConstantFloat>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Float
, otherwise None
sourcepub fn as_float(&self) -> Option<&ConstantFloat>
pub fn as_float(&self) -> Option<&ConstantFloat>
Optionally returns references to the inner fields if this is a ConstantEntry::Float
, otherwise None
sourcepub fn into_float(self) -> Result<ConstantFloat, Self>
pub fn into_float(self) -> Result<ConstantFloat, Self>
Returns the inner fields if this is a ConstantEntry::Float
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_long_mut(&mut self) -> Option<&mut ConstantLong>
pub fn as_long_mut(&mut self) -> Option<&mut ConstantLong>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Long
, otherwise None
sourcepub fn as_long(&self) -> Option<&ConstantLong>
pub fn as_long(&self) -> Option<&ConstantLong>
Optionally returns references to the inner fields if this is a ConstantEntry::Long
, otherwise None
sourcepub fn into_long(self) -> Result<ConstantLong, Self>
pub fn into_long(self) -> Result<ConstantLong, Self>
Returns the inner fields if this is a ConstantEntry::Long
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_double_mut(&mut self) -> Option<&mut ConstantDouble>
pub fn as_double_mut(&mut self) -> Option<&mut ConstantDouble>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Double
, otherwise None
sourcepub fn as_double(&self) -> Option<&ConstantDouble>
pub fn as_double(&self) -> Option<&ConstantDouble>
Optionally returns references to the inner fields if this is a ConstantEntry::Double
, otherwise None
sourcepub fn into_double(self) -> Result<ConstantDouble, Self>
pub fn into_double(self) -> Result<ConstantDouble, Self>
Returns the inner fields if this is a ConstantEntry::Double
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_name_and_type_mut(&mut self) -> Option<&mut ConstantNameAndType>
pub fn as_name_and_type_mut(&mut self) -> Option<&mut ConstantNameAndType>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::NameAndType
, otherwise None
sourcepub fn as_name_and_type(&self) -> Option<&ConstantNameAndType>
pub fn as_name_and_type(&self) -> Option<&ConstantNameAndType>
Optionally returns references to the inner fields if this is a ConstantEntry::NameAndType
, otherwise None
sourcepub fn into_name_and_type(self) -> Result<ConstantNameAndType, Self>
pub fn into_name_and_type(self) -> Result<ConstantNameAndType, Self>
Returns the inner fields if this is a ConstantEntry::NameAndType
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_utf8_mut(&mut self) -> Option<&mut ConstantUtf8>
pub fn as_utf8_mut(&mut self) -> Option<&mut ConstantUtf8>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Utf8
, otherwise None
sourcepub fn as_utf8(&self) -> Option<&ConstantUtf8>
pub fn as_utf8(&self) -> Option<&ConstantUtf8>
Optionally returns references to the inner fields if this is a ConstantEntry::Utf8
, otherwise None
sourcepub fn into_utf8(self) -> Result<ConstantUtf8, Self>
pub fn into_utf8(self) -> Result<ConstantUtf8, Self>
Returns the inner fields if this is a ConstantEntry::Utf8
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_method_handle_mut(&mut self) -> Option<&mut ConstantMethodHandle>
pub fn as_method_handle_mut(&mut self) -> Option<&mut ConstantMethodHandle>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::MethodHandle
, otherwise None
sourcepub fn as_method_handle(&self) -> Option<&ConstantMethodHandle>
pub fn as_method_handle(&self) -> Option<&ConstantMethodHandle>
Optionally returns references to the inner fields if this is a ConstantEntry::MethodHandle
, otherwise None
sourcepub fn into_method_handle(self) -> Result<ConstantMethodHandle, Self>
pub fn into_method_handle(self) -> Result<ConstantMethodHandle, Self>
Returns the inner fields if this is a ConstantEntry::MethodHandle
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_method_type_mut(&mut self) -> Option<&mut ConstantMethodType>
pub fn as_method_type_mut(&mut self) -> Option<&mut ConstantMethodType>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::MethodType
, otherwise None
sourcepub fn as_method_type(&self) -> Option<&ConstantMethodType>
pub fn as_method_type(&self) -> Option<&ConstantMethodType>
Optionally returns references to the inner fields if this is a ConstantEntry::MethodType
, otherwise None
sourcepub fn into_method_type(self) -> Result<ConstantMethodType, Self>
pub fn into_method_type(self) -> Result<ConstantMethodType, Self>
Returns the inner fields if this is a ConstantEntry::MethodType
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_dynamic_mut(&mut self) -> Option<&mut ConstantDynamic>
pub fn as_dynamic_mut(&mut self) -> Option<&mut ConstantDynamic>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Dynamic
, otherwise None
sourcepub fn as_dynamic(&self) -> Option<&ConstantDynamic>
pub fn as_dynamic(&self) -> Option<&ConstantDynamic>
Optionally returns references to the inner fields if this is a ConstantEntry::Dynamic
, otherwise None
sourcepub fn into_dynamic(self) -> Result<ConstantDynamic, Self>
pub fn into_dynamic(self) -> Result<ConstantDynamic, Self>
Returns the inner fields if this is a ConstantEntry::Dynamic
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_invoke_dynamic_mut(&mut self) -> Option<&mut ConstantInvokeDynamic>
pub fn as_invoke_dynamic_mut(&mut self) -> Option<&mut ConstantInvokeDynamic>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::InvokeDynamic
, otherwise None
sourcepub fn as_invoke_dynamic(&self) -> Option<&ConstantInvokeDynamic>
pub fn as_invoke_dynamic(&self) -> Option<&ConstantInvokeDynamic>
Optionally returns references to the inner fields if this is a ConstantEntry::InvokeDynamic
, otherwise None
sourcepub fn into_invoke_dynamic(self) -> Result<ConstantInvokeDynamic, Self>
pub fn into_invoke_dynamic(self) -> Result<ConstantInvokeDynamic, Self>
Returns the inner fields if this is a ConstantEntry::InvokeDynamic
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_package_mut(&mut self) -> Option<&mut ConstantPackage>
pub fn as_package_mut(&mut self) -> Option<&mut ConstantPackage>
Optionally returns mutable references to the inner fields if this is a ConstantEntry::Package
, otherwise None
sourcepub fn as_package(&self) -> Option<&ConstantPackage>
pub fn as_package(&self) -> Option<&ConstantPackage>
Optionally returns references to the inner fields if this is a ConstantEntry::Package
, otherwise None
sourcepub fn into_package(self) -> Result<ConstantPackage, Self>
pub fn into_package(self) -> Result<ConstantPackage, Self>
Returns the inner fields if this is a ConstantEntry::Package
, otherwise returns back the enum in the Err
case of the result
sourcepub fn is_reserved(&self) -> bool
pub fn is_reserved(&self) -> bool
Returns true if this is a ConstantEntry::Reserved
, otherwise false
Trait Implementations§
source§impl Clone for ConstantEntry
impl Clone for ConstantEntry
source§fn clone(&self) -> ConstantEntry
fn clone(&self) -> ConstantEntry
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more