[−][src]Struct full_moon::ast::LocalFunction
A declaration of a local function, such as local function x() end
Implementations
impl<'a> LocalFunction<'a>
[src]
pub fn new(name: Cow<'a, TokenReference<'a>>) -> Self
[src]
Returns a new LocalFunction from the given name
pub fn local_token(&self) -> &TokenReference<'a>
[src]
The local
token
pub fn function_token(&self) -> &TokenReference<'a>
[src]
The function
token
pub fn func_body(&self) -> &FunctionBody<'a>
[src]
The function body, everything except local function x
in local function x(a, b, c) call() end
pub fn name(&self) -> &TokenReference<'a>
[src]
The name of the function, the x
part of local function x() end
pub fn with_local_token(self, local_token: Cow<'a, TokenReference<'a>>) -> Self
[src]
Returns a new LocalFunction with the given local
token
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 LocalFunction with the given function
token
pub fn with_name(self, name: Cow<'a, TokenReference<'a>>) -> Self
[src]
Returns a new LocalFunction with the given name
pub fn with_func_body(self, func_body: FunctionBody<'a>) -> Self
[src]
Returns a new LocalFunction with the given function body
Trait Implementations
impl<'a> Clone for LocalFunction<'a>
[src]
pub fn clone(&self) -> LocalFunction<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for LocalFunction<'a>
[src]
impl<'de: 'a, 'a> Deserialize<'de> for LocalFunction<'a>
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a> Display for LocalFunction<'a>
[src]
impl<'a> Node<'a> for LocalFunction<'a>
[src]
pub fn start_position(&self) -> Option<Position>
[src]
pub fn end_position(&self) -> Option<Position>
[src]
pub fn similar(&self, other: &Self) -> bool
[src]
pub fn tokens<'b>(&'b self) -> Tokens<'a, 'b>ⓘ
[src]
pub fn range(&self) -> Option<(Position, Position)>
[src]
pub 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 LocalFunction<'a>
[src]
type Owned = LocalFunction<'static>
What an owned version of the object looks like. Usually contains a 'static
lifetime.
pub fn owned(&self) -> Self::Owned
[src]
impl<'a> PartialEq<LocalFunction<'a>> for LocalFunction<'a>
[src]
pub fn eq(&self, other: &LocalFunction<'a>) -> bool
[src]
pub fn ne(&self, other: &LocalFunction<'a>) -> bool
[src]
impl<'a> Serialize for LocalFunction<'a>
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a> StructuralPartialEq for LocalFunction<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for LocalFunction<'a>
[src]
impl<'a> Send for LocalFunction<'a>
[src]
impl<'a> Sync for LocalFunction<'a>
[src]
impl<'a> Unpin for LocalFunction<'a>
[src]
impl<'a> UnwindSafe for LocalFunction<'a>
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,