pub enum VariableSource<'a> {
Empty,
Directory(&'a DirectorySchema<'a>),
Binding(&'a Identifier<'a>, String),
Map(HashMap<String, String>),
}
Expand description
Ways in which variables may be provided by the current scope
Variants§
Empty
No available variables
Directory(&'a DirectorySchema<'a>)
A directory schema description, with its own variables
Binding(&'a Identifier<'a>, String)
A binding of a schema to a single name
Map(HashMap<String, String>)
A simple key-value map
Implementations§
source§impl<'a> VariableSource<'a>
impl<'a> VariableSource<'a>
sourcepub fn as_binding(&self) -> Option<(&Identifier<'a>, &String)>
pub fn as_binding(&self) -> Option<(&Identifier<'a>, &String)>
Convenience for attempting to cast to a single schema binding
Trait Implementations§
source§impl<'a> Debug for VariableSource<'a>
impl<'a> Debug for VariableSource<'a>
source§impl<'a> Default for VariableSource<'a>
impl<'a> Default for VariableSource<'a>
source§fn default() -> VariableSource<'a>
fn default() -> VariableSource<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> RefUnwindSafe for VariableSource<'a>
impl<'a> Send for VariableSource<'a>
impl<'a> Sync for VariableSource<'a>
impl<'a> Unpin for VariableSource<'a>
impl<'a> UnwindSafe for VariableSource<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more