[−][src]Struct emacs::Env
Main point of interaction with the Lisp runtime.
Methods
impl Env
[src]
Public APIs.
pub fn intern(&self, name: &str) -> Result<Value>
[src]
pub fn type_of(&self, value: Value) -> Result<Value>
[src]
pub fn is_not_nil(&self, value: Value) -> bool
[src]
Deprecated since 0.10.0:
Please use value.is_not_nil()
instead
pub fn eq(&self, a: Value, b: Value) -> bool
[src]
Deprecated since 0.10.0:
Please use value1.eq(value2)
instead
pub fn provide(&self, name: &str) -> Result<Value>
[src]
pub fn message<T: AsRef<str>>(&self, text: T) -> Result<Value>
[src]
impl Env
[src]
pub fn call<'e, F, A>(&'e self, func: F, args: A) -> Result<Value> where
F: IntoLispCallable<'e>,
A: IntoLispArgs<'e>,
[src]
F: IntoLispCallable<'e>,
A: IntoLispArgs<'e>,
Calls a Lisp function, passing the given arguments.
func
should be a string, or a Lisp's callableValue
(in which casefunc.call
is preferable). An error is signaled otherwise.args
should be an array/slice ofValue
, or a tuple of different types, each implementingIntoLisp
.
Examples
#[defun] fn listify_vec(vector: Vector) -> Result<Value> { let env = vector.0.env; let mut args = vec![]; for i in 0..vector.size()? { args.push(vector.get(i)?) } env.call("list", &args) }
pub fn list<'e, A>(&'e self, args: A) -> Result<Value> where
A: IntoLispArgs<'e>,
[src]
A: IntoLispArgs<'e>,
Trait Implementations
Auto Trait Implementations
impl !Sync for Env
impl !Send for Env
impl Unpin for Env
impl !RefUnwindSafe for Env
impl UnwindSafe for Env
Blanket Implementations
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,