pub struct FuncHeader {
pub name: LitSym,
pub params: Vec<Param>,
pub span: Range<usize>,
}Expand description
A function header, not including the body. Functions can have multiple parameters with
optional default values, like in f(x, y = 1). When a function with this header is called, the
default values are used (i.e. y = 1), unless the caller provides their own values (f(2, 3)).
Fields§
§name: LitSymThe name of the function.
params: Vec<Param>The parameters of the function.
span: Range<usize>The region of the source code that this function header was parsed from.
Implementations§
Trait Implementations§
Source§impl Clone for FuncHeader
impl Clone for FuncHeader
Source§fn clone(&self) -> FuncHeader
fn clone(&self) -> FuncHeader
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 FuncHeader
impl Debug for FuncHeader
Source§impl Display for FuncHeader
impl Display for FuncHeader
Source§impl From<FuncHeader> for AssignTarget
impl From<FuncHeader> for AssignTarget
Source§fn from(func: FuncHeader) -> Self
fn from(func: FuncHeader) -> Self
Converts to this type from the input type.
Source§impl Latex for FuncHeader
impl Latex for FuncHeader
Source§fn as_display(&self) -> LatexFormatter<'_, Self>
fn as_display(&self) -> LatexFormatter<'_, Self>
Wraps the value in a
LatexFormatter, which implements Display.Source§impl PartialEq for FuncHeader
impl PartialEq for FuncHeader
impl Eq for FuncHeader
impl StructuralPartialEq for FuncHeader
Auto Trait Implementations§
impl Freeze for FuncHeader
impl RefUnwindSafe for FuncHeader
impl Send for FuncHeader
impl Sync for FuncHeader
impl Unpin for FuncHeader
impl UnwindSafe for FuncHeader
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