Struct ra_ap_syntax::ast::RecordExprField
source · [−]pub struct RecordExprField { /* private fields */ }Implementations
sourceimpl RecordExprField
impl RecordExprField
pub fn for_field_name(field_name: &NameRef) -> Option<RecordExprField>
pub fn for_name_ref(name_ref: &NameRef) -> Option<RecordExprField>
sourcepub fn field_name(&self) -> Option<NameRef>
pub fn field_name(&self) -> Option<NameRef>
Deals with field init shorthand
sourceimpl RecordExprField
impl RecordExprField
pub fn parent_record_lit(&self) -> RecordExpr
sourceimpl RecordExprField
impl RecordExprField
sourcepub fn replace_expr(&self, expr: Expr)
pub fn replace_expr(&self, expr: Expr)
This will either replace the initializer, or in the case that this is a shorthand convert the initializer into the name ref and insert the expr as the new initializer.
Trait Implementations
sourceimpl AstNode for RecordExprField
impl AstNode for RecordExprField
fn can_cast(kind: SyntaxKind) -> bool
fn cast(syntax: SyntaxNode) -> Option<Self>
fn syntax(&self) -> &SyntaxNode
fn clone_for_update(&self) -> Self where
Self: Sized,
fn clone_subtree(&self) -> Self where
Self: Sized,
sourceimpl Clone for RecordExprField
impl Clone for RecordExprField
sourcefn clone(&self) -> RecordExprField
fn clone(&self) -> RecordExprField
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for RecordExprField
impl Debug for RecordExprField
sourceimpl Display for RecordExprField
impl Display for RecordExprField
sourceimpl HasAttrs for RecordExprField
impl HasAttrs for RecordExprField
fn attrs(&self) -> AstChildren<Attr>ⓘNotable traits for AstChildren<N>impl<N: AstNode> Iterator for AstChildren<N> type Item = N;
fn has_atom_attr(&self, atom: &str) -> bool
sourceimpl Hash for RecordExprField
impl Hash for RecordExprField
sourceimpl PartialEq<RecordExprField> for RecordExprField
impl PartialEq<RecordExprField> for RecordExprField
sourcefn eq(&self, other: &RecordExprField) -> bool
fn eq(&self, other: &RecordExprField) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &RecordExprField) -> bool
fn ne(&self, other: &RecordExprField) -> bool
This method tests for !=.
impl Eq for RecordExprField
impl StructuralEq for RecordExprField
impl StructuralPartialEq for RecordExprField
Auto Trait Implementations
impl !RefUnwindSafe for RecordExprField
impl !Send for RecordExprField
impl !Sync for RecordExprField
impl Unpin for RecordExprField
impl !UnwindSafe for RecordExprField
Blanket Implementations
sourceimpl<N> AstNodeEdit for N where
N: AstNode + Clone,
impl<N> AstNodeEdit for N where
N: AstNode + Clone,
fn indent_level(&self) -> IndentLevel
fn indent(&self, level: IndentLevel) -> Self
fn dedent(&self, level: IndentLevel) -> Self
fn reset_indent(&self) -> Self
sourceimpl<T> AttrsOwnerEdit for T where
T: HasAttrs,
impl<T> AttrsOwnerEdit for T where
T: HasAttrs,
fn remove_attrs_and_docs(&self)
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<N> Indent for N where
N: AstNode + Clone,
impl<N> Indent for N where
N: AstNode + Clone,
fn indent_level(&self) -> IndentLevel
fn indent(&self, by: IndentLevel)
fn dedent(&self, by: IndentLevel)
fn reindent_to(&self, target_level: IndentLevel)
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more