Struct racer::Session [−][src]
pub struct Session<'c> { pub generic_impls: RefCell<HashMap<(PathBuf, usize), Rc<Vec<(usize, String, GenericsVisitor, ImplVisitor)>>>>, // some fields omitted }
Context for a Racer operation
Fields
generic_impls: RefCell<HashMap<(PathBuf, usize), Rc<Vec<(usize, String, GenericsVisitor, ImplVisitor)>>>>
Cache for generic impls
Methods
impl<'c> Session<'c>
[src]
impl<'c> Session<'c>
pub fn new(cache: &'c FileCache) -> Session<'c>
[src]
pub fn new(cache: &'c FileCache) -> Session<'c>
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);
pub fn cache_file_contents<T, P>(&self, filepath: P, buf: T) where
T: Into<String>,
P: Into<PathBuf>,
[src]
pub fn cache_file_contents<T, P>(&self, filepath: P, buf: T) where
T: Into<String>,
P: Into<PathBuf>,
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); session.cache_file_contents("foo.rs", "pub struct Foo;\\n");
pub fn contains_file<P: AsRef<Path>>(&self, path: P) -> bool
[src]
pub fn contains_file<P: AsRef<Path>>(&self, path: P) -> bool