aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-20 19:46:17 +0100
committerAleksey Kladov <[email protected]>2018-10-20 19:46:17 +0100
commit61518580ed60bb16edcd4fb7200d0b564b5ee9e9 (patch)
tree37809d3bcf4177661803d0093143a92d6bff1ce2 /crates/ra_analysis/src
parent73dd870da2dcc991b0fdcdde8bee91f05cb9e182 (diff)
introduce cancelable
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r--crates/ra_analysis/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index 46cc0722b..b1d5c4936 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -37,6 +37,11 @@ pub use ra_editor::{
37 RunnableKind, StructureNode, 37 RunnableKind, StructureNode,
38}; 38};
39 39
40#[derive(Clone, Copy, Debug)]
41pub struct Cancel;
42
43pub type Cancelable<T> = Result<T, Cancel>;
44
40#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 45#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
41pub struct FileId(pub u32); 46pub struct FileId(pub u32);
42 47