pub struct Env { /* private fields */ }Implementations§
Source§impl Env
impl Env
pub fn new( vars: Vec<String>, prompts: Vec<String>, secrets: Vec<String>, ) -> Self
pub fn get_builtin_index(&self, name: &str) -> Option<(&Rc<BuiltinFn>, u8)>
pub fn get_user_builtin_index(&self, name: &str) -> Option<(&Rc<BuiltinFn>, u8)>
pub fn add_user_builtins(&mut self, builtins: Vec<Rc<BuiltinFn>>)
pub fn add_user_builtin(&mut self, builtin: Rc<BuiltinFn>)
pub fn get_builtin(&self, index: usize) -> Option<&Rc<BuiltinFn>>
pub fn get_user_builtin(&self, index: usize) -> Option<&Rc<BuiltinFn>>
pub fn get_var(&self, index: usize) -> Option<&String>
pub fn get_prompt(&self, index: usize) -> Option<&String>
pub fn get_secret(&self, index: usize) -> Option<&String>
Trait Implementations§
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