rust/crates/rust-analyzer/src/document.rs

17 lines
415 B
Rust
Raw Normal View History

//! In-memory document information.
/// Information about a document that the Language Client
2020-07-24 16:55:17 -05:00
/// knows about.
/// Its lifetime is driven by the textDocument/didOpen and textDocument/didClose
/// client notifications.
#[derive(Debug, Clone)]
pub(crate) struct DocumentData {
pub(crate) version: i32,
}
impl DocumentData {
pub(crate) fn new(version: i32) -> Self {
DocumentData { version }
}
}