pub_just/
binding.rs

1use super::*;
2
3/// A binding of `name` to `value`
4#[derive(Debug, Clone, PartialEq, Serialize)]
5pub struct Binding<'src, V = String> {
6  #[serde(skip)]
7  pub constant: bool,
8  pub export: bool,
9  #[serde(skip)]
10  pub file_depth: u32,
11  pub name: Name<'src>,
12  pub private: bool,
13  pub value: V,
14}
15
16impl<'src, V> Keyed<'src> for Binding<'src, V> {
17  fn key(&self) -> &'src str {
18    self.name.lexeme()
19  }
20}