[−][src]Struct racer::Session
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>
Methods
impl<'c> Session<'c>
[src]
pub fn new(cache: &'c FileCache) -> Session<'c>
[src]
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 with_project_model(
cache: &'c FileCache,
project_model: Box<dyn ProjectModelProvider + 'c>
) -> Session<'c>
[src]
cache: &'c FileCache,
project_model: Box<dyn ProjectModelProvider + 'c>
) -> Session<'c>
pub fn cache_file_contents<T, P>(&self, filepath: P, buf: T) where
T: Into<String>,
P: Into<PathBuf>,
[src]
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]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> SpecializationError for E
[src]
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,