pub struct MethodInfo {
pub method: ImplItemFn,
pub name: Ident,
pub docs: Option<String>,
pub params: Vec<ParamInfo>,
pub return_info: ReturnInfo,
pub is_async: bool,
}Expand description
Parsed method information with full syn AST types.
This is the rich, compile-time representation used by all proc macros
during code generation. It retains full syn::Type and syn::Ident
nodes for accurate token generation.
Not to be confused with [server_less_core::MethodInfo], which is
a simplified, string-based representation for runtime introspection.
Fields§
§method: ImplItemFnThe original method
name: IdentMethod name
docs: Option<String>Documentation string
params: Vec<ParamInfo>Parameters (excluding self)
return_info: ReturnInfoReturn type info
is_async: boolWhether the method is async
Implementations§
Source§impl MethodInfo
impl MethodInfo
Sourcepub fn parse(method: &ImplItemFn) -> Result<Option<Self>>
pub fn parse(method: &ImplItemFn) -> Result<Option<Self>>
Parse a method from an ImplItemFn
Returns None for associated functions without &self (constructors, etc.)
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