pub struct Vm { /* private fields */ }
Implementations§
Source§impl Vm
impl Vm
pub fn get_global(&mut self, name: &'static str) -> Option<ReturnValue>
pub fn register_extra_native_functions(&mut self)
pub fn inject_sso_instance<K>(&mut self, fields: HashMap<K, Value>)
pub fn inject_variables(&mut self, variables: HashMap<String, Value>)
pub fn inject_object<K>( &mut self, name: &'static str, fields: HashMap<K, Value>, )
Source§impl Vm
impl Vm
pub fn new( pg_connection: Option<PgPool>, sqlite_connection: Option<SqlitePool>, redis_connection: Option<MultiplexedConnection>, ) -> Self
pub fn run_file(&mut self, path: PathBuf)
pub fn compile(&mut self, source: &'static str) -> Result<(), VmError>
pub fn eval_function( &mut self, chunk_id: u16, params: &[Value], ) -> Result<ReturnValue, VmError>
pub fn interpret(&mut self) -> Result<ReturnValue, VmError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Vm
impl !RefUnwindSafe for Vm
impl !Send for Vm
impl !Sync for Vm
impl Unpin for Vm
impl !UnwindSafe for Vm
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more