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 aFileCache
. 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);
pub fn with_project_model(
cache: &'c FileCache,
project_model: Box<dyn ProjectModelProvider + 'c>
) -> Session<'c>
[src]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
Auto Trait Implementations
impl<'c> !RefUnwindSafe for Session<'c>
impl<'c> !UnwindSafe for Session<'c>