[−][src]Struct full_moon::ast::FunctionDeclaration
A normal function declaration, supports simple declarations like function x() end
as well as complicated declarations such as function x.y.z:a() end
Methods
impl<'a> FunctionDeclaration<'a>
[src]
pub fn new(name: FunctionName<'a>) -> Self
[src]
Creates a new FunctionDeclaration from the given name
pub fn function_token(&self) -> &TokenReference<'a>
[src]
The function
token
pub fn body(&self) -> &FunctionBody<'a>
[src]
The body of the function
pub fn name(&self) -> &FunctionName<'a>
[src]
The name of the function
pub fn with_function_token(
self,
function_token: Cow<'a, TokenReference<'a>>
) -> Self
[src]
self,
function_token: Cow<'a, TokenReference<'a>>
) -> Self
Returns a new FunctionDeclaration with the given function
token
pub fn with_name(self, name: FunctionName<'a>) -> Self
[src]
Returns a new FunctionDeclaration with the given function name
pub fn with_body(self, body: FunctionBody<'a>) -> Self
[src]
Returns a new FunctionDeclaration with the given function body
Trait Implementations
impl<'a> Clone for FunctionDeclaration<'a>
[src]
fn clone(&self) -> FunctionDeclaration<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for FunctionDeclaration<'a>
[src]
impl<'de: 'a, 'a> Deserialize<'de> for FunctionDeclaration<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a> Display for FunctionDeclaration<'a>
[src]
impl<'a> Node<'a> for FunctionDeclaration<'a>
[src]
fn start_position(&self) -> Option<Position>
[src]
fn end_position(&self) -> Option<Position>
[src]
fn similar(&self, other: &Self) -> bool
[src]
fn tokens<'b>(&'b self) -> Tokens<'a, 'b>
[src]
fn range(&self) -> Option<(Position, Position)>
[src]
fn surrounding_trivia<'b>(
&'b self
) -> (Vec<Cow<'b, Token<'ast>>>, Vec<Cow<'b, Token<'ast>>>)
[src]
&'b self
) -> (Vec<Cow<'b, Token<'ast>>>, Vec<Cow<'b, Token<'ast>>>)
impl<'a> Owned for FunctionDeclaration<'a>
[src]
type Owned = FunctionDeclaration<'static>
What an owned version of the object looks like. Usually contains a 'static
lifetime.
fn owned(&self) -> Self::Owned
[src]
impl<'a> PartialEq<FunctionDeclaration<'a>> for FunctionDeclaration<'a>
[src]
fn eq(&self, other: &FunctionDeclaration<'a>) -> bool
[src]
fn ne(&self, other: &FunctionDeclaration<'a>) -> bool
[src]
impl<'a> Serialize for FunctionDeclaration<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a> StructuralPartialEq for FunctionDeclaration<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for FunctionDeclaration<'a>
impl<'a> Send for FunctionDeclaration<'a>
impl<'a> Sync for FunctionDeclaration<'a>
impl<'a> Unpin for FunctionDeclaration<'a>
impl<'a> UnwindSafe for FunctionDeclaration<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,