Struct racer::Session[][src]

pub struct Session<'c> {
    pub generic_impls: RefCell<HashMap<(PathBuf, BytePos), Vec<Rc<ImplHeader>>>>,
    pub project_model: Box<dyn ProjectModelProvider + 'c>,
    // some fields omitted
}
Expand description

Context for a Racer operation

Fields

generic_impls: RefCell<HashMap<(PathBuf, BytePos), Vec<Rc<ImplHeader>>>>

Cache for generic impls

project_model: Box<dyn ProjectModelProvider + 'c>

Implementations

Create a Session for use in Racer operations

  • cache is a reference to a FileCache. It’s take by reference for use across racer operations.

Examples

extern crate racer;

let cache = racer::FileCache::default();
let session = racer::Session::new(&cache, None);

Specify the contents of a file to be used in completion operations

The path to the file and the file’s contents must both be specified.

Examples

extern crate racer;

let cache = racer::FileCache::default();
let session = racer::Session::new(&cache, None);

session.cache_file_contents("foo.rs", "pub struct Foo;\\n");

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.