Trait WithFixture

Source
pub trait WithFixture:
    Default
    + ExpandDatabase
    + SourceDatabase
    + 'static {
    // Provided methods
    fn with_single_file(ra_fixture: &str) -> (Self, EditionedFileId) { ... }
    fn with_many_files(ra_fixture: &str) -> (Self, Vec<EditionedFileId>) { ... }
    fn with_files(ra_fixture: &str) -> Self { ... }
    fn with_files_extra_proc_macros(
        ra_fixture: &str,
        proc_macros: Vec<(String, ProcMacro)>,
    ) -> Self { ... }
    fn with_position(ra_fixture: &str) -> (Self, FilePosition) { ... }
    fn with_range(ra_fixture: &str) -> (Self, FileRange) { ... }
    fn with_range_or_offset(
        ra_fixture: &str,
    ) -> (Self, EditionedFileId, RangeOrOffset) { ... }
    fn test_crate(&self) -> Crate { ... }
}

Provided Methods§

Source

fn with_single_file(ra_fixture: &str) -> (Self, EditionedFileId)

Source

fn with_many_files(ra_fixture: &str) -> (Self, Vec<EditionedFileId>)

Source

fn with_files(ra_fixture: &str) -> Self

Source

fn with_files_extra_proc_macros( ra_fixture: &str, proc_macros: Vec<(String, ProcMacro)>, ) -> Self

Source

fn with_position(ra_fixture: &str) -> (Self, FilePosition)

Source

fn with_range(ra_fixture: &str) -> (Self, FileRange)

Source

fn with_range_or_offset( ra_fixture: &str, ) -> (Self, EditionedFileId, RangeOrOffset)

Source

fn test_crate(&self) -> Crate

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<DB: ExpandDatabase + SourceDatabase + Default + 'static> WithFixture for DB