Struct arithmetic_parser::FnDefinition
source · #[non_exhaustive]pub struct FnDefinition<'a, T: Grammar> {
pub args: Spanned<'a, Destructure<'a, T::Type<'a>>>,
pub body: Block<'a, T>,
}
Expand description
Function definition, e.g., |x, y| x + y
.
A function definition consists of a list of arguments and the function body.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.args: Spanned<'a, Destructure<'a, T::Type<'a>>>
Function arguments, e.g., x, y
.
body: Block<'a, T>
Function body, e.g., x + y
.
Trait Implementations§
source§impl<'a, T: Grammar> Clone for FnDefinition<'a, T>
impl<'a, T: Grammar> Clone for FnDefinition<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for FnDefinition<'a, T>
impl<'a, T> RefUnwindSafe for FnDefinition<'a, T>
impl<'a, T> Send for FnDefinition<'a, T>
impl<'a, T> Sync for FnDefinition<'a, T>
impl<'a, T> Unpin for FnDefinition<'a, T>
impl<'a, T> UnwindSafe for FnDefinition<'a, T>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)