pub struct MethodInfo {
pub name: String,
pub doc_comment: Option<String>,
pub file_path: String,
pub line_number: usize,
pub visibility: Visibility,
pub is_async: bool,
pub is_const: bool,
pub is_unsafe: bool,
pub generics: Vec<String>,
pub parameters: Vec<ParameterInfo>,
pub return_type: Option<String>,
pub receiver: Option<Receiver>,
}Expand description
Represents a method implemented on a struct.
Fields§
§name: StringThe name of the method.
doc_comment: Option<String>Documentation comment for the method.
file_path: StringThe file where this method is defined.
line_number: usizeLine number where the method starts.
visibility: VisibilityVisibility of the method.
is_async: boolWhether this is an async method.
is_const: boolWhether this is a const method.
is_unsafe: boolWhether this is an unsafe method.
generics: Vec<String>Generic parameters if any.
parameters: Vec<ParameterInfo>Parameters of the method.
return_type: Option<String>Return type of the method (None for -> ()).
receiver: Option<Receiver>The receiver type (self, &self, &mut self, or None for associated functions).
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 moreSource§impl Debug for MethodInfo
impl Debug for MethodInfo
Source§impl<'de> Deserialize<'de> for MethodInfo
impl<'de> Deserialize<'de> for MethodInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MethodInfo
impl RefUnwindSafe for MethodInfo
impl Send for MethodInfo
impl Sync for MethodInfo
impl Unpin 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