[−][src]Struct full_moon::ast::LocalAssignment
An assignment to a local variable, such as local x = 1
Methods
impl<'a> LocalAssignment<'a>
[src]
pub fn new(name_list: Punctuated<'a, Cow<'a, TokenReference<'a>>>) -> Self
[src]
Returns a new LocalAssignment from the given name list
pub fn local_token(&self) -> &TokenReference<'a>
[src]
The local
token
pub fn equal_token(&self) -> Option<&TokenReference<'a>>
[src]
The =
token in between local x = y
, if one exists
pub fn expr_list(&self) -> &Punctuated<'a, Expression<'a>>
[src]
Returns the Punctuated
sequence of the expressions being assigned.
This is the 1, 2
part of local x, y = 1, 2
pub fn name_list(&self) -> &Punctuated<'a, Cow<'a, TokenReference<'a>>>
[src]
Returns the Punctuated
sequence of names being assigned to.
This is the x, y
part of local x, y = 1, 2
pub fn with_local_token(self, local_token: Cow<'a, TokenReference<'a>>) -> Self
[src]
Returns a new LocalAssignment with the given local
token
pub fn with_name_list(
self,
name_list: Punctuated<'a, Cow<'a, TokenReference<'a>>>
) -> Self
[src]
self,
name_list: Punctuated<'a, Cow<'a, TokenReference<'a>>>
) -> Self
Returns a new LocalAssignment with the given name list
pub fn with_equal_token(
self,
equal_token: Option<Cow<'a, TokenReference<'a>>>
) -> Self
[src]
self,
equal_token: Option<Cow<'a, TokenReference<'a>>>
) -> Self
Returns a new LocalAssignment with the given =
token
pub fn with_expr_list(self, expr_list: Punctuated<'a, Expression<'a>>) -> Self
[src]
Returns a new LocalAssignment with the given expression list
Trait Implementations
impl<'a> Clone for LocalAssignment<'a>
[src]
fn clone(&self) -> LocalAssignment<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for LocalAssignment<'a>
[src]
impl<'de: 'a, 'a> Deserialize<'de> for LocalAssignment<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'_> Display for LocalAssignment<'_>
[src]
impl<'a> Node<'a> for LocalAssignment<'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 LocalAssignment<'a>
[src]
type Owned = LocalAssignment<'static>
What an owned version of the object looks like. Usually contains a 'static
lifetime.
fn owned(&self) -> Self::Owned
[src]
impl<'a> PartialEq<LocalAssignment<'a>> for LocalAssignment<'a>
[src]
fn eq(&self, other: &LocalAssignment<'a>) -> bool
[src]
fn ne(&self, other: &LocalAssignment<'a>) -> bool
[src]
impl<'a> Serialize for LocalAssignment<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a> StructuralPartialEq for LocalAssignment<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for LocalAssignment<'a>
impl<'a> Send for LocalAssignment<'a>
impl<'a> Sync for LocalAssignment<'a>
impl<'a> Unpin for LocalAssignment<'a>
impl<'a> UnwindSafe for LocalAssignment<'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>,