pub async fn load_document_from_disk(uri: &Uri) -> Result<String>Expand description
Loads document content from disk.
§Arguments
uri- Document URI (must be file:// scheme)
§Returns
Ok(String)- File contentErr(DepsError)- File not found, permission denied, or not a file URI
§Errors
DepsError::InvalidUri- URI is not a file:// URIDepsError::Io- File read error (not found, permission denied, etc.)
§Examples
use deps_lsp::document::load_document_from_disk;
use tower_lsp_server::ls_types::Uri;
let uri = Uri::from_file_path("/path/to/Cargo.toml").unwrap();
let content = load_document_from_disk(&uri).await?;
println!("Loaded {} bytes", content.len());