[][src]Crate glsp_engine

Macros

arr

Constructs an array.

bail

Constructs a GError and returns it.

ensure

Tests a condition, returning an error if the result is false.

epr

Prints to the active Runtime's current epr_writer.

eprn

Prints to the active Runtime's current epr_writer, with a trailing '\n'.

error

Constructs a GError by formatting a string.

macro_no_op

Constructs a GError which represents a macro-no-op, and returns it.

pr

Prints to the active Runtime's current pr_writer.

prn

Prints to the active Runtime's current pr_writer, with a trailing '\n'.

str

Constructs a string.

sym

Constructs a symbol.

syms

Define a struct which contains a collection of symbols.

tab

Constructs a table.

try_arr

A non-panicking version of arr!.

try_tab

A non-panicking version of tab!.

Structs

Arr

The arr primitive type.

Class

The class primitive type.

Coro

The coro primitive type.

GError

The error type generated by GameLisp code.

GFn

The fn primitive type.

GIter

The iter primitive type.

Gc

A weak pointer onto the garbage-collected heap.

GcVal

Equivalent to Val, except that it stores weak Gc pointers rather than strong Root pointers.

GcVisitor

Visitor passed to an RData's trace callback.

IterDeque

An infallible iterator over a deque's contents.

IterDequeTo

A converting iterator over a deque's contents.

IterTab

An infallible iterator over a table's (key, value) pairs.

IterTabKeys

An infallible iterator over a table's keys.

IterTabKeysTo

A converting iterator over a table's keys.

IterTabTo

A converting iterator over a table's (key, value) pairs.

IterTabValues

An infallible iterator over a table's values.

IterTabValuesTo

A converting iterator over a table's values.

Obj

The obj primitive type.

RClass

GameLisp bindings for a particular Rust type.

RClassBuilder

Builder used to define GameLisp bindings for a particular Rust type.

RData

The rdata primitive type.

RFn

The rfn primitive type.

RGc

A strongly-typed, weakly-rooted pointer to an RData.

RGlobalRef

A reference to global data.

RGlobalRefMut

A mutable reference to global data.

RRef

A shared reference to an RData.

RRefMut

A mutable reference to an RData.

RRoot

A strongly-typed pointer to an RData.

Rest

An adapter type which collects any number of trailing function arguments.

Root

A pointer onto the garbage-collected heap.

Str

The str primitive type.

Sym

The sym primitive type.

Tab

The tab primitive type.

TabEntries

An adapter struct which can be used to iterate over the contents of a table.

Enums

Callable

A type-erased callable.

CoroState

The return value for the Coro::state method.

Deque

A type-erased deque.

EnvMode

A lexical-environment capture mode.

Expander

A type-erased expander.

Expansion

The return value for glsp::expand_1.

GIterLen

The return value for GIter::len.

Iterable

A type-erased iterable.

Num

A type-erased num.

Val

Any GameLisp value.

Constants

GC_DEFAULT_RATIO

Equivalent to (gc-value 'default-ratio).

GC_MIN_RATIO

Equivalent to (gc-value 'min-ratio).

Traits

CallableOps

The callable abstract type.

DequeAccess

Indexing the deque abstract type.

DequeAccessRange

Indexing the deque abstract type.

DequeIndex

An integer type which can be used as a deque index.

DequeOps

The deque abstract type.

DequeRange

An integer range type which can be used to slice a deque.

FromElement

A type which can be extracted from a deque.

FromVal

A type which can be converted from a GameLisp value.

IntoCallArgs

A type which can be converted into the arguments to a function call.

IntoElement

A type which can be stored in a deque.

IntoVal

A type which can be converted to a GameLisp value.

IterableOps

The iterable abstract type.

RGlobal

A marker trait for global data.

Splay

A type which can be passed to the arr! macro as a splayed argument.

ToSym

A type which can be converted to a Sym.

Functions

add_rglobal

Registers global data.

arr

Constructs an empty array.

arr_from_elem

Constructs an array which contains reps repetitions of elem.

arr_from_iter

Constructs an array from the contents of a Rust iterator.

arr_with_capacity

Constructs an empty array with space for at least capacity elements.

bind_global

Equivalent to (bind-global! s).

bind_macro

Equivalent to (bind-macro! s).

bind_rfn

Binds a Rust function to a global variable.

bind_rfn_macro

Binds a Rust function to a global macro.

call

Invokes a callable value: an RFn, GFn or Class.

chain

Equivalent to (chain ..args).

chunks

Equivalent to (chunks len src-arr).

chunks_exact

Equivalent to (chunks-exact len src-arr).

cloned

Equivalent to (cloned base).

coro_finish

Equivalent to (coro-finish! co).

coro_run

Equivalent to (coro-run co arg).

cycle

Equivalent to (cycle base).

deep_cloned

Equivalent to (deep-cloned base).

del_global

Equivalent to (del-global! s).

del_macro

Equivalent to (del-macro! s).

enumerate

Equivalent to (enumerate base).

eval

Equivalent to (eval val env-mode).

eval_multi

Equivalent to (eval-multi vals env-mode).

expand

Equivalent to (expand val env-mode)

expand_1

Equivalent to (expand-1 env-mode val expander)

expand_multi

Equivalent to (expand-multi vals env-mode)

file_location

Equivalent to (file-location).

filter

Equivalent to (filter f base).

flatten

Equivalent to (flatten base).

freeze_global

Equivalent to (freeze-global! s).

gc

Equivalent to (gc).

gc_ghost_bytes

Equivalent to (gc-value 'ghost-bytes).

gc_old_bytes

Equivalent to (gc-value 'old-bytes).

gc_ratio

Equivalent to (gc-value 'ratio).

gc_set_ratio

Equivalent to (= (gc-value 'ratio) ratio).

gc_young_bytes

Equivalent to (gc-value 'young-bytes).

gensym

Equivalent to (gensym).

gensym_with_tag

Equivalent to (gensym tag).

get_macro

Equivalent to (macro s).

global

Equivalent to (global s).

has_global

Equivalent to (has-global? s).

has_macro

Equivalent to (has-macro? s).

is_representable_sym

Equivalent to (representable-sym-str? st).

is_valid_sym

Equivalent to (valid-sym-str? st).

is_valid_sym_char

Equivalent to (valid-sym-char? ch).

lines

Equivalent to (lines st).

load

Equivalent to (load filename).

load_str

Equivalent to (load-str text).

map

Equivalent to (map f base).

named_rfn

Creates a GameLisp value which represents a Rust function, with a name.

once

Equivalent to (once ..args).

once_with

Equivalent to (once-with f).

parse

Equivalent to (parse text filename).

parse_1

Equivalent to (parse-1 text filename).

parse_all

Equivalent to (parse-all text filename).

rchunks

Equivalent to (rchunks len src-arr).

rchunks_exact

Equivalent to (rchunks-exact len src-arr).

rdata

Moves a Rust value onto the garbage-collected heap.

repeat

Equivalent to (repeat ..args).

repeat_with

Equivalent to (repeat-with f).

require

Equivalent to (require filename).

rev

Equivalent to (rev base).

rfn

Creates a GameLisp value which represents a Rust function.

rn

Equivalent to (rn start end step-by).

rni

Equivalent to (rni start end step-by).

rroot

Moves a Rust value onto the garbage-collected heap, returning a typed pointer.

seed_gensym

Makes future gensyms globally unique.

set_epr_writer

Changes the output writer used by epr, eprn, epr! and eprn!.

set_global

Equivalent to (= (global s) val).

set_macro

Equivalent to (= (macro s) expander).

set_pr_writer

Changes the output writer used by pr, prn, pr! and prn!.

skip

Equivalent to (skip n base).

skip_while

Equivalent to (skip-while f base).

split

Equivalent to (split st split-at).

stack_trace

Equivalent to (stack-trace).

step_by

Equivalent to (step-by n base).

str

Constructs an empty string.

str_from_iter

Constructs a string from the characters in a Rust iterator.

str_from_rust_str

Constructs an empty string with the same contents as a Rust string slice.

str_with_capacity

Constructs an empty string with space for at least capacity characters.

sym

Equivalent to (sym name).

tab

Constructs an empty table.

tab_from_iter

Constructs a table from the key/value pairs in a Rust iterator.

tab_with_capacity

Constructs an empty table with space for at least capacity elements.

take

Equivalent to (take n base).

take_rglobal

Unregisters and returns global data which was previously registered using glsp::add_rglobal.

take_while

Equivalent to (take-while f base).

try_call

Calls a function with either verbose or brief error-reporting.

windows

Equivalent to (windows len src-arr).

write_barrier

Notifies the garbage collector that an RData has been mutated.

zip

Equivalent to (zip ..args).

Type Definitions

GResult