just/src/binding.rs

19 lines
441 B
Rust
Raw Normal View History

use crate::common::*;
/// A binding of `name` to `value`
2021-06-08 01:01:27 -07:00
#[derive(Debug, Clone, PartialEq)]
pub(crate) struct Binding<'src, V = String> {
/// Export binding as an environment variable to child processes
pub(crate) export: bool,
/// Binding name
pub(crate) name: Name<'src>,
/// Binding value
pub(crate) value: V,
}
impl<'src, V> Keyed<'src> for Binding<'src, V> {
fn key(&self) -> &'src str {
self.name.lexeme()
}
}