cairo_lang_syntax::node::db

Trait SyntaxGroup

Source
pub trait SyntaxGroup:
    Database
    + HasQueryGroup<SyntaxDatabase>
    + FilesGroup
    + Upcast<dyn FilesGroup> {
    // Required methods
    fn intern_green(&self, field: Arc<GreenNode>) -> GreenId;
    fn lookup_intern_green(&self, key: GreenId) -> Arc<GreenNode>;
    fn intern_stable_ptr(&self, field: SyntaxStablePtr) -> SyntaxStablePtrId;
    fn lookup_intern_stable_ptr(
        &self,
        key: SyntaxStablePtrId,
    ) -> SyntaxStablePtr;
    fn get_children(&self, node: SyntaxNode) -> Arc<[SyntaxNode]>;
}

Required Methods§

Trait Implementations§

Source§

impl<'a> DebugWithDb<dyn SyntaxGroup + 'a> for Attribute

Source§

fn fmt(&self, f: &mut Formatter<'_>, db: &(dyn SyntaxGroup + 'a)) -> Result

Source§

fn debug<'me, 'db>(&'me self, db: &'me Db) -> DebugWith<'me, Db>
where Self: Sized + 'me,

Source§

fn into_debug<'me, 'db>(self, db: &'me Db) -> DebugWith<'me, Db>
where Self: Sized + 'me,

Source§

impl<'a> Intern<'a, dyn SyntaxGroup + 'a, GreenId> for Arc<GreenNode>

Source§

fn intern(self, db: &(impl Upcast<dyn SyntaxGroup + 'a> + ?Sized)) -> GreenId

Source§

impl<'a> Intern<'a, dyn SyntaxGroup + 'a, SyntaxStablePtrId> for SyntaxStablePtr

Source§

fn intern( self, db: &(impl Upcast<dyn SyntaxGroup + 'a> + ?Sized), ) -> SyntaxStablePtrId

Source§

impl<'a> LookupIntern<'a, dyn SyntaxGroup + 'a, Arc<GreenNode>> for GreenId

Source§

fn lookup_intern( &self, db: &(impl Upcast<dyn SyntaxGroup + 'a> + ?Sized), ) -> Arc<GreenNode>

Source§

impl<'a> LookupIntern<'a, dyn SyntaxGroup + 'a, SyntaxStablePtr> for SyntaxStablePtrId

Source§

fn lookup_intern( &self, db: &(impl Upcast<dyn SyntaxGroup + 'a> + ?Sized), ) -> SyntaxStablePtr

Implementors§

Source§

impl<DB> SyntaxGroup for DB
where DB: FilesGroup + Upcast<dyn FilesGroup> + Database + HasQueryGroup<SyntaxDatabase>,