pub struct RustBuilder<'config> { /* private fields */ }Expand description
AST builder for the Rust language.
RustBuilder is responsible for parsing Rust source code and constructing
an Abstract Syntax Tree (AST). It uses a Pratt parser to handle operator
precedence in expressions and supports all Rust syntax features.
Implementations§
Source§impl<'config> RustBuilder<'config>
impl<'config> RustBuilder<'config>
Sourcepub fn build_generics_and_where(
&self,
node: RedNode<'_, RustLanguage>,
source: &SourceText,
) -> Result<Option<Generics>, OakError>
pub fn build_generics_and_where( &self, node: RedNode<'_, RustLanguage>, source: &SourceText, ) -> Result<Option<Generics>, OakError>
Builds generic parameters and where clauses from a node’s children.
Source§impl<'config> RustBuilder<'config>
impl<'config> RustBuilder<'config>
Sourcepub const fn new(config: &'config RustLanguage) -> Self
pub const fn new(config: &'config RustLanguage) -> Self
Creates a new RustBuilder with the given configuration.
Trait Implementations§
Source§impl<'config> Builder<RustLanguage> for RustBuilder<'config>
impl<'config> Builder<RustLanguage> for RustBuilder<'config>
Source§fn build<'a, S: Source + ?Sized>(
&self,
source: &S,
edits: &[TextEdit],
_cache: &'a mut impl BuilderCache<RustLanguage>,
) -> BuildOutput<RustLanguage>
fn build<'a, S: Source + ?Sized>( &self, source: &S, edits: &[TextEdit], _cache: &'a mut impl BuilderCache<RustLanguage>, ) -> BuildOutput<RustLanguage>
Builds the higher-level structure (typically an AST) from the source text. Read more
Source§impl<'config> Clone for RustBuilder<'config>
impl<'config> Clone for RustBuilder<'config>
Source§fn clone(&self) -> RustBuilder<'config>
fn clone(&self) -> RustBuilder<'config>
Returns a duplicate 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 moreimpl<'config> Copy for RustBuilder<'config>
Auto Trait Implementations§
impl<'config> Freeze for RustBuilder<'config>
impl<'config> RefUnwindSafe for RustBuilder<'config>
impl<'config> Send for RustBuilder<'config>
impl<'config> Sync for RustBuilder<'config>
impl<'config> Unpin for RustBuilder<'config>
impl<'config> UnsafeUnpin for RustBuilder<'config>
impl<'config> UnwindSafe for RustBuilder<'config>
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