pub struct PureFn {
pub attrs: Vec<PureAttribute>,
pub vis: PureVis,
pub is_async: bool,
pub is_async_inferred: bool,
pub is_const: bool,
pub is_unsafe: bool,
pub abi: Option<String>,
pub name: String,
pub generics: PureGenerics,
pub params: Vec<PureParam>,
pub ret: Option<PureType>,
pub body: PureBlock,
}Expand description
A function definition.
Fields§
§attrs: Vec<PureAttribute>Attributes.
vis: PureVisVisibility.
is_async: boolIs async (explicit async fn)?
is_async_inferred: boolIs async inferred from return type (Pin<Box<dyn Future<...>>>)?
This is typically set when #[async_trait] or similar macros are used.
is_const: boolIs const?
is_unsafe: boolIs unsafe?
abi: Option<String>ABI (e.g., "C", "Rust", "system"). None means default Rust ABI.
name: StringFunction name.
generics: PureGenericsGeneric parameters.
params: Vec<PureParam>Parameters.
ret: Option<PureType>Return type (None = unit).
body: PureBlockFunction body.
Implementations§
Trait Implementations§
impl Eq for PureFn
impl StructuralPartialEq for PureFn
Auto Trait Implementations§
impl Freeze for PureFn
impl RefUnwindSafe for PureFn
impl Send for PureFn
impl Sync for PureFn
impl Unpin for PureFn
impl UnsafeUnpin for PureFn
impl UnwindSafe for PureFn
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