pub struct FieldExpression { /* private fields */ }
Expand description
Represents a field access expression.
A field access expression accesses a member of a table using dot notation,
such as table.field
. It consists of a prefix (the table being accessed)
and a field identifier.
Implementations§
Source§impl FieldExpression
impl FieldExpression
Sourcepub fn new<IntoPrefix: Into<Prefix>, IntoIdentifier: Into<Identifier>>(
prefix: IntoPrefix,
field: IntoIdentifier,
) -> Self
pub fn new<IntoPrefix: Into<Prefix>, IntoIdentifier: Into<Identifier>>( prefix: IntoPrefix, field: IntoIdentifier, ) -> Self
Creates a new field access expression.
Sourcepub fn with_token(self, token: Token) -> Self
pub fn with_token(self, token: Token) -> Self
Attaches a token to this field expression and returns the updated expression.
Sourcepub fn get_token(&self) -> Option<&Token>
pub fn get_token(&self) -> Option<&Token>
Returns a reference to the token attached to this field expression, if any.
Sourcepub fn get_prefix(&self) -> &Prefix
pub fn get_prefix(&self) -> &Prefix
Returns a reference to the prefix of this field expression.
Sourcepub fn get_field(&self) -> &Identifier
pub fn get_field(&self) -> &Identifier
Returns a reference to the field identifier of this field expression.
Sourcepub fn mutate_prefix(&mut self) -> &mut Prefix
pub fn mutate_prefix(&mut self) -> &mut Prefix
Returns a mutable reference to the prefix of this field expression.
Sourcepub fn mutate_first_token(&mut self) -> &mut Token
pub fn mutate_first_token(&mut self) -> &mut Token
Returns a mutable reference to the first token of this field expression, creating it if missing.
Sourcepub fn mutate_last_token(&mut self) -> &mut Token
pub fn mutate_last_token(&mut self) -> &mut Token
Returns a mutable reference to the last token of this field expression, creating it if missing.
Sourcepub fn clear_comments(&mut self)
pub fn clear_comments(&mut self)
Clears all comments from the tokens in this node.
Sourcepub fn clear_whitespaces(&mut self)
pub fn clear_whitespaces(&mut self)
Clears all whitespaces information from the tokens in this node.
Trait Implementations§
Source§impl Clone for FieldExpression
impl Clone for FieldExpression
Source§fn clone(&self) -> FieldExpression
fn clone(&self) -> FieldExpression
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FieldExpression
impl Debug for FieldExpression
Source§impl From<FieldExpression> for Expression
impl From<FieldExpression> for Expression
Source§fn from(field: FieldExpression) -> Expression
fn from(field: FieldExpression) -> Expression
Source§impl From<FieldExpression> for Prefix
impl From<FieldExpression> for Prefix
Source§fn from(field: FieldExpression) -> Self
fn from(field: FieldExpression) -> Self
Source§impl From<FieldExpression> for Variable
impl From<FieldExpression> for Variable
Source§fn from(field: FieldExpression) -> Self
fn from(field: FieldExpression) -> Self
Source§impl PartialEq for FieldExpression
impl PartialEq for FieldExpression
impl Eq for FieldExpression
impl StructuralPartialEq for FieldExpression
Auto Trait Implementations§
impl Freeze for FieldExpression
impl RefUnwindSafe for FieldExpression
impl Send for FieldExpression
impl Sync for FieldExpression
impl Unpin for FieldExpression
impl UnwindSafe for FieldExpression
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
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
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)
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>
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>
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 more