pub struct FunctionDetail {
pub is_async: bool,
pub is_const: bool,
pub is_unsafe: bool,
pub params: Vec<ParamInfo>,
pub return_type: Option<String>,
pub generics: GenericInfo,
pub is_method: bool,
pub self_ty: Option<String>,
pub trait_impl: Option<String>,
pub has_self: bool,
pub attrs: Vec<String>,
}Expand description
Function/method details.
Fields§
§is_async: boolIs async fn?
is_const: boolIs const fn?
is_unsafe: boolIs unsafe fn?
params: Vec<ParamInfo>Parameters.
return_type: Option<String>Return type (None = unit).
generics: GenericInfoGeneric parameters.
is_method: boolIs this a method (in impl/trait)?
self_ty: Option<String>Self type for methods (e.g., “Foo” in impl Foo).
trait_impl: Option<String>Trait being implemented (e.g., “Clone” in impl Clone for Foo).
has_self: boolHas self parameter (&self, &mut self, self).
attrs: Vec<String>Attribute paths (e.g., [“deprecated”, “allow”, “inline”]).
Trait Implementations§
Source§impl Clone for FunctionDetail
impl Clone for FunctionDetail
Source§fn clone(&self) -> FunctionDetail
fn clone(&self) -> FunctionDetail
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FunctionDetail
impl Debug for FunctionDetail
Source§impl<'de> Deserialize<'de> for FunctionDetail
impl<'de> Deserialize<'de> for FunctionDetail
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
Source§impl PartialEq for FunctionDetail
impl PartialEq for FunctionDetail
Source§fn eq(&self, other: &FunctionDetail) -> bool
fn eq(&self, other: &FunctionDetail) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FunctionDetail
impl Serialize for FunctionDetail
impl Eq for FunctionDetail
impl StructuralPartialEq for FunctionDetail
Auto Trait Implementations§
impl Freeze for FunctionDetail
impl RefUnwindSafe for FunctionDetail
impl Send for FunctionDetail
impl Sync for FunctionDetail
impl Unpin for FunctionDetail
impl UnsafeUnpin for FunctionDetail
impl UnwindSafe for FunctionDetail
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<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