#[non_exhaustive]pub struct MethodRef<'a> {
pub class: &'a str,
pub name: &'a str,
pub proto: &'a str,
}Expand description
A method as Lowner;->name(args)Ret; proto is (args)Ret, which
tells overloads apart. Every part borrows from the signature.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.class: &'a strThe declaring class descriptor.
name: &'a strThe method name (<init> / <clinit> included).
proto: &'a str(args)Ret.
Implementations§
Source§impl<'a> MethodRef<'a>
impl<'a> MethodRef<'a>
Sourcepub fn parse(signature: &'a str) -> Result<MethodRef<'a>, MappingError>
pub fn parse(signature: &'a str) -> Result<MethodRef<'a>, MappingError>
Parse the canonical form exactly as written, like FieldRef::parse.
§Errors
MappingError::Method when signature is not of that form.
Trait Implementations§
impl<'a> Copy for MethodRef<'a>
impl<'a> Eq for MethodRef<'a>
Source§impl<'a> Ord for MethodRef<'a>
impl<'a> Ord for MethodRef<'a>
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<'a> PartialOrd for MethodRef<'a>
impl<'a> PartialOrd for MethodRef<'a>
impl<'a> StructuralPartialEq for MethodRef<'a>
Auto Trait Implementations§
impl<'a> Forget for MethodRef<'a>
impl<'a> Freeze for MethodRef<'a>
impl<'a> Move for MethodRef<'a>
impl<'a> RefUnwindSafe for MethodRef<'a>
impl<'a> Send for MethodRef<'a>
impl<'a> Sync for MethodRef<'a>
impl<'a> Unpin for MethodRef<'a>
impl<'a> UnsafeUnpin for MethodRef<'a>
impl<'a> UnwindSafe for MethodRef<'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