pub struct Record { /* private fields */ }Expand description
Typed DCF record.
Implementations§
Source§impl Record
impl Record
Sourcepub fn syntax(&self) -> &SyntaxNode<DcfLanguage>
pub fn syntax(&self) -> &SyntaxNode<DcfLanguage>
Returns the underlying Rowan node.
Sourcepub fn fields(&self) -> impl Iterator<Item = Field>
pub fn fields(&self) -> impl Iterator<Item = Field>
Iterates over every valid field, including duplicates.
Sourcepub fn fields_named<'a>(
&'a self,
name: &'a str,
) -> impl Iterator<Item = Field> + 'a
pub fn fields_named<'a>( &'a self, name: &'a str, ) -> impl Iterator<Item = Field> + 'a
Iterates over fields whose names exactly equal name.
Sourcepub fn field(&self, name: &str) -> Option<Field>
pub fn field(&self, name: &str) -> Option<Field>
Returns the first field whose name exactly equals name.
Sourcepub fn last_field(&self, name: &str) -> Option<Field>
pub fn last_field(&self, name: &str) -> Option<Field>
Returns the last field whose name exactly equals name.
Sourcepub fn source_range(&self) -> SourceSpan
pub fn source_range(&self) -> SourceSpan
Returns the record’s source range.
Trait Implementations§
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl !RefUnwindSafe for Record
impl !Send for Record
impl !Sync for Record
impl !UnwindSafe for Record
impl Freeze for Record
impl Unpin for Record
impl UnsafeUnpin for Record
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