diff options
author | Aleksey Kladov <[email protected]> | 2018-10-20 19:46:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-20 19:46:17 +0100 |
commit | 61518580ed60bb16edcd4fb7200d0b564b5ee9e9 (patch) | |
tree | 37809d3bcf4177661803d0093143a92d6bff1ce2 /crates/ra_analysis/src | |
parent | 73dd870da2dcc991b0fdcdde8bee91f05cb9e182 (diff) |
introduce cancelable
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r-- | crates/ra_analysis/src/lib.rs | 5 |
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)] | ||
41 | pub struct Cancel; | ||
42 | |||
43 | pub 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)] |
41 | pub struct FileId(pub u32); | 46 | pub struct FileId(pub u32); |
42 | 47 | ||