pub struct LocalAssignStatement { /* private fields */ }
Implementations§
Source§impl LocalAssignStatement
impl LocalAssignStatement
pub fn new(variables: Vec<TypedIdentifier>, values: Vec<Expression>) -> Self
pub fn from_variable<S: Into<TypedIdentifier>>(variable: S) -> Self
pub fn with_tokens(self, tokens: LocalAssignTokens) -> Self
pub fn set_tokens(&mut self, tokens: LocalAssignTokens)
pub fn get_tokens(&self) -> Option<&LocalAssignTokens>
pub fn mutate_tokens(&mut self) -> Option<&mut LocalAssignTokens>
pub fn with_variable<S: Into<TypedIdentifier>>(self, variable: S) -> Self
pub fn with_value<E: Into<Expression>>(self, value: E) -> Self
pub fn into_assignments(self) -> (Vec<TypedIdentifier>, Vec<Expression>)
pub fn append_assignment<S: Into<TypedIdentifier>>( &mut self, variable: S, value: Expression, )
pub fn for_each_assignment<F>(&mut self, callback: F)
pub fn get_variables(&self) -> &Vec<TypedIdentifier>
pub fn iter_variables(&self) -> impl Iterator<Item = &TypedIdentifier>
pub fn iter_mut_variables( &mut self, ) -> impl Iterator<Item = &mut TypedIdentifier>
pub fn append_variables(&mut self, variables: &mut Vec<TypedIdentifier>)
pub fn extend_values<T: IntoIterator<Item = Expression>>(&mut self, iter: T)
pub fn iter_mut_values(&mut self) -> impl Iterator<Item = &mut Expression>
pub fn iter_values(&self) -> impl Iterator<Item = &Expression>
pub fn push_variable(&mut self, variable: impl Into<TypedIdentifier>)
pub fn push_value(&mut self, value: impl Into<Expression>)
pub fn append_values(&mut self, values: &mut Vec<Expression>)
pub fn last_value(&self) -> Option<&Expression>
pub fn pop_value(&mut self) -> Option<Expression>
pub fn remove_value(&mut self, index: usize) -> Option<Expression>
pub fn remove_variable(&mut self, index: usize) -> Option<TypedIdentifier>
pub fn values_len(&self) -> usize
pub fn variables_len(&self) -> usize
pub fn has_values(&self) -> bool
pub fn clear_types(&mut self)
pub fn clear_comments(&mut self)
pub fn clear_whitespaces(&mut self)
Trait Implementations§
Source§impl Clone for LocalAssignStatement
impl Clone for LocalAssignStatement
Source§fn clone(&self) -> LocalAssignStatement
fn clone(&self) -> LocalAssignStatement
Returns a copy 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 LocalAssignStatement
impl Debug for LocalAssignStatement
Source§impl From<LocalAssignStatement> for Statement
impl From<LocalAssignStatement> for Statement
Source§fn from(assign: LocalAssignStatement) -> Statement
fn from(assign: LocalAssignStatement) -> Statement
Converts to this type from the input type.
Source§impl PartialEq for LocalAssignStatement
impl PartialEq for LocalAssignStatement
impl Eq for LocalAssignStatement
impl StructuralPartialEq for LocalAssignStatement
Auto Trait Implementations§
impl Freeze for LocalAssignStatement
impl RefUnwindSafe for LocalAssignStatement
impl Send for LocalAssignStatement
impl Sync for LocalAssignStatement
impl Unpin for LocalAssignStatement
impl UnwindSafe for LocalAssignStatement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more