Enum ezno_parser::functions::FunctionHeader
source · pub enum FunctionHeader {
VirginFunctionHeader {
async_keyword: Option<Keyword<Async>>,
function_keyword: Keyword<Function>,
generator_star_token_pos: Option<Span>,
},
ChadFunctionHeader {
async_keyword: Option<Keyword<Async>>,
generator_keyword: Option<Keyword<Generator>>,
function_keyword: Keyword<Function>,
},
}
Variants§
Implementations§
Trait Implementations§
source§impl ASTNode for FunctionHeader
impl ASTNode for FunctionHeader
source§fn get_position(&self) -> Cow<'_, Span>
fn get_position(&self) -> Cow<'_, Span>
Returns position of node as span AS IT WAS PARSED. May be none if AST was doesn’t match anything in source
fn from_reader( reader: &mut impl TokenReader<TSXToken, Span>, _state: &mut ParsingState, _settings: &ParseOptions ) -> ParseResult<Self>
fn to_string_from_buffer<T: ToString>( &self, buf: &mut T, _settings: &ToStringOptions, _depth: u8 )
source§fn from_string(
source: String,
settings: ParseOptions,
source_id: SourceId,
offset: Option<usize>,
cursors: Vec<(usize, EmptyCursorId)>
) -> ParseResult<Self>
fn from_string( source: String, settings: ParseOptions, source_id: SourceId, offset: Option<usize>, cursors: Vec<(usize, EmptyCursorId)> ) -> ParseResult<Self>
From string, with default impl to call abstract method from_reader
source§fn to_string(&self, settings: &ToStringOptions) -> String
fn to_string(&self, settings: &ToStringOptions) -> String
Returns structure as valid string
source§impl Clone for FunctionHeader
impl Clone for FunctionHeader
source§fn clone(&self) -> FunctionHeader
fn clone(&self) -> FunctionHeader
Returns a copy 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 FunctionHeader
impl Debug for FunctionHeader
source§impl PartialEq<FunctionHeader> for FunctionHeader
impl PartialEq<FunctionHeader> for FunctionHeader
source§fn eq(&self, other: &FunctionHeader) -> bool
fn eq(&self, other: &FunctionHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for FunctionHeader
impl StructuralEq for FunctionHeader
impl StructuralPartialEq for FunctionHeader
Auto Trait Implementations§
impl RefUnwindSafe for FunctionHeader
impl Send for FunctionHeader
impl Sync for FunctionHeader
impl Unpin for FunctionHeader
impl UnwindSafe for FunctionHeader
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