Skip to main content

BlockRefResolverTrait

Trait BlockRefResolverTrait 

Source
pub trait BlockRefResolverTrait {
    // Required methods
    fn resolve_block_ref_name(
        &self,
        ref_name: &str,
    ) -> Option<(SheetId, BlockId)>;
    fn resolve_block_field(
        &self,
        sheet_id: SheetId,
        block_id: BlockId,
        field: &str,
    ) -> Option<BlockFieldId>;
    fn fetch_block_ref_name(
        &self,
        sheet_id: SheetId,
        block_id: BlockId,
    ) -> Option<String>;
    fn fetch_block_field_name(
        &self,
        sheet_id: SheetId,
        block_id: BlockId,
        field_id: BlockFieldId,
    ) -> Option<String>;
}
Expand description

Resolves a BlockRef ref-name into a stable (sheet_id, block_id) pair, and resolves field names to stable ids. Used by the parser to do the id-substitution at parse time.

Required Methods§

Source

fn resolve_block_ref_name(&self, ref_name: &str) -> Option<(SheetId, BlockId)>

Source

fn resolve_block_field( &self, sheet_id: SheetId, block_id: BlockId, field: &str, ) -> Option<BlockFieldId>

Source

fn fetch_block_ref_name( &self, sheet_id: SheetId, block_id: BlockId, ) -> Option<String>

Source

fn fetch_block_field_name( &self, sheet_id: SheetId, block_id: BlockId, field_id: BlockFieldId, ) -> Option<String>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§