aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/document.rs
blob: e882c9865c0b0daa3a0c78c2783df284b8fb47ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! In-memory document information.

/// Information about a document that the Language Client
/// knows about.
/// Its lifetime is driven by the textDocument/didOpen and textDocument/didClose
/// client notifications.
#[derive(Debug, Clone)]
pub(crate) struct DocumentData {
    pub version: Option<i64>,
}

impl DocumentData {
    pub fn new(version: i64) -> Self {
        DocumentData { version: Some(version) }
    }
}