Function racer::complete_fully_qualified_name[][src]

pub fn complete_fully_qualified_name<'c, S, P>(
    query: S,
    path: P,
    session: &'c Session<'_>
) -> MatchIter<'c> where
    S: AsRef<str>,
    P: AsRef<Path>, 
Expand description

Find completions for a fully qualified name like std::io::

Searchs are started relative to path.

  • query - is the fqn to search for
  • path - the directory to start searching in
  • session - reference to a racer::Session
extern crate racer;

let path = std::path::Path::new(".");
let cache = racer::FileCache::default();
let session = racer::Session::new(&cache, Some(path));

let m = racer::complete_fully_qualified_name(
    "std::fs::canon",
    &path,
    &session
).next().unwrap();

assert_eq!(&m.matchstr[..], "canonicalize");
assert_eq!(m.mtype, racer::MatchType::Function);