process_uri

Function process_uri 

Source
pub fn process_uri(uri: &Uri) -> UriConversion
Expand description

Sanitizes the URI path sent by an LSP client

  • “%3A” is replaced by ‘:’ on windows, as this is likely escaped by the emacs client on windows/mingw/msys2
  • Returning UriConversion::Canonicalized indicates a path was able to be canonicalized. This indicates the path is valid and said file exists on disk
  • Returning UriConversion::Unchecked indicates that the path couldn’t be canonicalized

§Panics

Will panic if uri cannot be interpreted as valid utf-8 after being percent-decoded