pub struct MethodInfo {
pub name: String,
pub location: ByteSpan,
pub synthetic: bool,
pub accessor_mode: Option<ClassAccessorMode>,
}Expand description
Information about a method (subroutine) in a class.
Fields§
§name: StringMethod name
location: ByteSpanSource location of the sub declaration
synthetic: boolWhether this method was synthesized from framework metadata.
accessor_mode: Option<ClassAccessorMode>Accessor mode for Class::Accessor-generated methods.
Implementations§
Source§impl MethodInfo
impl MethodInfo
Sourcepub fn new(name: String, location: ByteSpan) -> MethodInfo
pub fn new(name: String, location: ByteSpan) -> MethodInfo
Construct a regular declared method.
Sourcepub fn synthetic(
name: String,
location: ByteSpan,
accessor_mode: Option<ClassAccessorMode>,
) -> MethodInfo
pub fn synthetic( name: String, location: ByteSpan, accessor_mode: Option<ClassAccessorMode>, ) -> MethodInfo
Construct a synthetic method generated from framework metadata.
Trait Implementations§
Source§impl Clone for MethodInfo
impl Clone for MethodInfo
Source§fn clone(&self) -> MethodInfo
fn clone(&self) -> MethodInfo
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 moreAuto Trait Implementations§
impl Freeze for MethodInfo
impl RefUnwindSafe for MethodInfo
impl Send for MethodInfo
impl Sync for MethodInfo
impl Unpin for MethodInfo
impl UnsafeUnpin for MethodInfo
impl UnwindSafe for MethodInfo
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