diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-27 12:05:00 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-27 12:05:12 +0100 |
| commit | 43ef60c09cc48f6b7c6dd752ab7af7c0d6071bc5 (patch) | |
| tree | 525320e583fc53e9474fd4b4d4944cdf8117d406 /src/model/value.rs | |
| parent | c56299c6bde121807c3febbef0766ff2fe2b32f2 (diff) | |
Tracing-based expression tooltips
Diffstat (limited to 'src/model/value.rs')
| -rw-r--r-- | src/model/value.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/model/value.rs b/src/model/value.rs index 15656c42..ba3a550f 100644 --- a/src/model/value.rs +++ b/src/model/value.rs @@ -155,6 +155,14 @@ impl Value { _ => self.display(), } } + + /// Try to extract documentation for the value. + pub fn docs(&self) -> Option<&'static str> { + match self { + Self::Func(func) => func.info().map(|info| info.docs), + _ => None, + } + } } impl Default for Value { |
