pub enum TypeDescriptor {
Primitive(PrimitiveType),
Reference(ClassName),
Array {
dimensions: u8,
element: Box<TypeDescriptor>,
},
}Expand description
A non-void JVM field type descriptor.
Variants§
Primitive(PrimitiveType)
A primitive descriptor type.
Reference(ClassName)
A reference to a class identified by its JVM internal name.
Array
An array descriptor with its dimension count and element descriptor.
Fields
§
element: Box<TypeDescriptor>Type stored at the array’s innermost dimension.
Implementations§
Source§impl TypeDescriptor
impl TypeDescriptor
Sourcepub fn parse(input: &str) -> Result<Self, DescriptorError>
pub fn parse(input: &str) -> Result<Self, DescriptorError>
Parses one complete non-void JVM field descriptor.
For example, I describes an integer and [Ljava/lang/String;
describes an array of strings.
Sourcepub const fn slot_width(&self) -> u8
pub const fn slot_width(&self) -> u8
Returns the number of JVM local-variable or operand-stack slots used.
Trait Implementations§
Source§impl Clone for TypeDescriptor
impl Clone for TypeDescriptor
Source§impl Debug for TypeDescriptor
impl Debug for TypeDescriptor
impl Eq for TypeDescriptor
Source§impl Hash for TypeDescriptor
impl Hash for TypeDescriptor
Source§impl PartialEq for TypeDescriptor
impl PartialEq for TypeDescriptor
impl StructuralPartialEq for TypeDescriptor
Auto Trait Implementations§
impl Forget for TypeDescriptor
impl Freeze for TypeDescriptor
impl Move for TypeDescriptor
impl RefUnwindSafe for TypeDescriptor
impl Send for TypeDescriptor
impl Sync for TypeDescriptor
impl Unpin for TypeDescriptor
impl UnsafeUnpin for TypeDescriptor
impl UnwindSafe for TypeDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.