Skip to main content

Db

Trait Db 

Source
pub trait Db: Database {
    // Required methods
    fn vendored(&self) -> &VendoredFileSystem;
    fn system(&self) -> &dyn System;
    fn files(&self) -> &Files;
}
Expand description

Most basic database that gives access to files, the host system, source code, and parsed AST.

Required Methods§

Source

fn vendored(&self) -> &VendoredFileSystem

Source

fn system(&self) -> &dyn System

Source

fn files(&self) -> &Files

Trait Implementations§

Source§

impl FileResolver for &dyn Db

Source§

fn path(&self, file: File) -> &str

Returns the path associated with the file given.
Source§

fn input(&self, file: File) -> Input

Returns the input contents associated with the file given.
Source§

fn notebook_index(&self, file: &UnifiedFile) -> Option<NotebookIndex>

Returns the NotebookIndex associated with the file given, if it’s a Jupyter notebook.
Source§

fn is_notebook(&self, file: &UnifiedFile) -> bool

Returns whether the file given is a Jupyter notebook.
Source§

fn current_directory(&self) -> &Path

Returns the current working directory.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§