pub enum FnArg {
SelfRef(ArgSelfRef),
SelfValue(ArgSelf),
Captured(ArgCaptured),
Inferred(Pat),
Ignored(Type),
}
Expand description
An argument in a function signature: the n: usize
in fn f(n: usize)
.
This type is available if Syn is built with the "full"
feature.
Syntax tree enum
This type is a syntax tree enum.
Variants§
SelfRef(ArgSelfRef)
Self captured by reference in a function signature: &self
or &mut self
.
This type is available if Syn is built with the "full"
feature.
SelfValue(ArgSelf)
Self captured by value in a function signature: self
or mut self
.
This type is available if Syn is built with the "full"
feature.
Captured(ArgCaptured)
An explicitly typed pattern captured by a function signature.
This type is available if Syn is built with the "full"
feature.
Inferred(Pat)
A pattern whose type is inferred captured by a function signature.
Ignored(Type)
A type not bound to any pattern in a function signature.
Trait Implementations§
source§impl From<ArgCaptured> for FnArg
impl From<ArgCaptured> for FnArg
source§fn from(e: ArgCaptured) -> FnArg
fn from(e: ArgCaptured) -> FnArg
Converts to this type from the input type.
source§impl From<ArgSelfRef> for FnArg
impl From<ArgSelfRef> for FnArg
source§fn from(e: ArgSelfRef) -> FnArg
fn from(e: ArgSelfRef) -> FnArg
Converts to this type from the input type.