#[repr(u8)]pub enum MethodHandle {
RefGetField(FieldRef),
RefGetStatic(FieldRef),
RefPutField(FieldRef),
RefPutStatic(FieldRef),
RefInvokeVirtual(MethodRef),
RefInvokeStatic(MethodRef),
RefInvokeSpecial(MethodRef),
RefNewInvokeSpecial(MethodRef),
RefInvokeInterface(MethodRef),
}Expand description
A method handle. See the JVM Specification §4.4.8 for more information.
Variants§
RefGetField(FieldRef)
Get an instance field.
RefGetStatic(FieldRef)
Get a static field.
RefPutField(FieldRef)
Writes to an instance field.
RefPutStatic(FieldRef)
Writes to a static field.
RefInvokeVirtual(MethodRef)
Invoke an instance method.
RefInvokeStatic(MethodRef)
Invoke a static method.
RefInvokeSpecial(MethodRef)
Invoke a special method (e.g., a constructor).
RefNewInvokeSpecial(MethodRef)
The new version a special method (e.g., a constructor).
RefInvokeInterface(MethodRef)
Invoke an interface method.
Implementations§
Source§impl MethodHandle
impl MethodHandle
Sourcepub const fn reference_kind(&self) -> u8
pub const fn reference_kind(&self) -> u8
Gets the reference kind of this method handle.
Trait Implementations§
Source§impl Clone for MethodHandle
impl Clone for MethodHandle
Source§fn clone(&self) -> MethodHandle
fn clone(&self) -> MethodHandle
Returns a duplicate of the value. Read more
1.0.0 · 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 MethodHandle
impl Debug for MethodHandle
Source§impl Ord for MethodHandle
impl Ord for MethodHandle
Source§fn cmp(&self, other: &MethodHandle) -> Ordering
fn cmp(&self, other: &MethodHandle) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MethodHandle
impl PartialEq for MethodHandle
Source§impl PartialOrd for MethodHandle
impl PartialOrd for MethodHandle
impl Eq for MethodHandle
impl StructuralPartialEq for MethodHandle
Auto Trait Implementations§
impl Freeze for MethodHandle
impl RefUnwindSafe for MethodHandle
impl Send for MethodHandle
impl Sync for MethodHandle
impl Unpin for MethodHandle
impl UnwindSafe for MethodHandle
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> Comparable<K> for Q
impl<Q, K> Comparable<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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more