pub struct TypeFunction {
pub export_keyword: Option<Token>,
pub type_keyword: Token,
pub function_keyword: Token,
pub function_name: Token,
pub generics: Option<Pointer<GenericDeclaration>>,
pub parameters: BracketedList<Parameter>,
pub colon: Option<Pointer<Token>>,
pub return_type: Option<Pointer<TypeValue>>,
pub body: Block,
pub end_keyword: Token,
}Expand description
Type functions (available in the new Luau TypeSolver).
Fields§
§export_keyword: Option<Token>The export keyword.
type_keyword: TokenThe type keyword.
function_keyword: TokenThe function keyword.
function_name: TokenThe name of the function.
generics: Option<Pointer<GenericDeclaration>>The generics of the function.
parameters: BracketedList<Parameter>The parameters that this function accepts.
colon: Option<Pointer<Token>>The : character between closing parenthesis and returns.
return_type: Option<Pointer<TypeValue>>The return type of the function
body: BlockThe body of the function.
end_keyword: TokenThe end keyword.
Trait Implementations§
Source§impl Clone for TypeFunction
impl Clone for TypeFunction
Source§fn clone(&self) -> TypeFunction
fn clone(&self) -> TypeFunction
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 TypeFunction
impl Debug for TypeFunction
Source§impl GetRange for TypeFunction
impl GetRange for TypeFunction
Source§impl Hash for TypeFunction
impl Hash for TypeFunction
Source§impl Ord for TypeFunction
impl Ord for TypeFunction
Source§fn cmp(&self, other: &TypeFunction) -> Ordering
fn cmp(&self, other: &TypeFunction) -> 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 TypeFunction
impl Parse for TypeFunction
Source§impl PartialEq for TypeFunction
impl PartialEq for TypeFunction
Source§impl PartialOrd for TypeFunction
impl PartialOrd for TypeFunction
Source§impl Print for TypeFunction
impl Print for TypeFunction
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 TypeFunction
impl TryParse for TypeFunction
impl Eq for TypeFunction
impl StructuralPartialEq for TypeFunction
Auto Trait Implementations§
impl Freeze for TypeFunction
impl RefUnwindSafe for TypeFunction
impl !Send for TypeFunction
impl !Sync for TypeFunction
impl Unpin for TypeFunction
impl UnwindSafe for TypeFunction
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