Struct taschenrechner::prelude::Env[][src]

pub struct Env(_);

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

impl Default for Env[src]

fn default() -> Self[src]

Recomended initiation-point.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.