Struct taschenrechner::prelude::Env [−][src]
Contains all variables and functions as definitions. Use Default to initiate with common definitions.
Implementations
impl Env
[src]
pub fn new() -> Env
[src]
Default is recommended instead, because it contains common definitions.
pub fn get(&self, symbol: &Symbol) -> Result<&Def, TypeErr>
[src]
Return a definition by symbol.
pub fn insert(&mut self, symbol: Symbol, def: Def) -> Option<Def>
[src]
Define new definition.
pub fn remove(&mut self, symbol: Symbol) -> Option<Def>
[src]
Remove definition by symbol.
pub fn load(path: &str) -> Result<Env, String>
[src]
Loads a file of definitions. The crate come with default_env.txt
.
Did work with WASM, probably because it is an internal file.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnwindSafe for Env
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,