pub struct Env {
pub point: Point,
pub vars: HashMap<String, Substance>,
pub file_resolver: FileResolver,
pub var_resolvers: MultiVarResolver,
/* private fields */
}
Fields§
§point: Point
§vars: HashMap<String, Substance>
§file_resolver: FileResolver
§var_resolvers: MultiVarResolver
Implementations§
Source§impl Env
impl Env
pub fn new(working: Point) -> Self
pub fn no_point() -> Self
pub fn push(self) -> Self
pub fn push_working<S: ToString>(self, segs: S) -> Result<Self, SpaceErr>
pub fn point_or(&self) -> Result<Point, SpaceErr>
pub fn pop(self) -> Result<Env, SpaceErr>
pub fn add_var_resolver(&mut self, var_resolver: Arc<dyn VarResolver>)
pub fn val<K: ToString>(&self, var: K) -> Result<Substance, ResolverErr>
pub fn set_working(&mut self, point: Point)
pub fn working(&self) -> &Point
pub fn set_var_str<V: ToString>(&mut self, key: V, value: V)
pub fn set_var<V: ToString>(&mut self, key: V, value: Substance)
pub fn file<N: ToString>(&self, name: N) -> Result<File, ResolverErr>
pub fn set_file<N: ToString>(&mut self, name: N, content: Bin)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Env
impl<'de> Deserialize<'de> for Env
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Env
impl !RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl !UnwindSafe for Env
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
Source§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more