[−][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, project_path: Option<&Path>) -> 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, None);
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, None); 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
impl<'c> Unpin for Session<'c>
impl<'c> !Sync for Session<'c>
impl<'c> !Send for Session<'c>
impl<'c> !UnwindSafe for Session<'c>
impl<'c> !RefUnwindSafe for Session<'c>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,