pub enum GlobalFunctionName {
SimpleName(Token),
Table {
table: Token,
keys: Vec<TableAccessKey>,
method: Option<Pointer<(Token, Token)>>,
},
}Expand description
An enum representing possible ways in which a global function’s name can be.
Variants§
SimpleName(Token)
Just a simple name, this is usually in local functions but some people don’t do so.
Table
A table.
function foo.bar()
endFields
§
table: TokenThe table that’s being accessed
local foo = {}
function foo.bar()
endHere, the table is foo.
§
keys: Vec<TableAccessKey>Fields accessed from the table.
local foo = {}
function foo.bar.qux:Test()
endHere, the keys are bar and qux.
§Note
All ListItems here will be will be NonTrailing. And key.0 will always
be the dot character.
Trait Implementations§
Source§impl Clone for GlobalFunctionName
impl Clone for GlobalFunctionName
Source§fn clone(&self) -> GlobalFunctionName
fn clone(&self) -> GlobalFunctionName
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 GlobalFunctionName
impl Debug for GlobalFunctionName
Source§impl GetRange for GlobalFunctionName
impl GetRange for GlobalFunctionName
Source§impl Hash for GlobalFunctionName
impl Hash for GlobalFunctionName
Source§impl Ord for GlobalFunctionName
impl Ord for GlobalFunctionName
Source§fn cmp(&self, other: &GlobalFunctionName) -> Ordering
fn cmp(&self, other: &GlobalFunctionName) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl Parse for GlobalFunctionName
impl Parse for GlobalFunctionName
Source§impl PartialEq for GlobalFunctionName
impl PartialEq for GlobalFunctionName
Source§impl PartialOrd for GlobalFunctionName
impl PartialOrd for GlobalFunctionName
Source§impl Print for GlobalFunctionName
impl Print for GlobalFunctionName
Source§fn print_final_trivia(&self) -> String
fn print_final_trivia(&self) -> String
Prints only the very final trivia. Used for the default implementation of
Print::print, which just joins Print::print_without_final_trivia
and this function.Source§fn print_without_final_trivia(&self) -> String
fn print_without_final_trivia(&self) -> String
Prints the whole token including all surrounding trivia, excluding the
very last trailing trivia.
Source§impl TryParse for GlobalFunctionName
impl TryParse for GlobalFunctionName
impl Eq for GlobalFunctionName
impl StructuralPartialEq for GlobalFunctionName
Auto Trait Implementations§
impl Freeze for GlobalFunctionName
impl RefUnwindSafe for GlobalFunctionName
impl !Send for GlobalFunctionName
impl !Sync for GlobalFunctionName
impl Unpin for GlobalFunctionName
impl UnwindSafe for GlobalFunctionName
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