Crate lovm2_std

Source

Structs§

Buffer
File
Regex
Request
Response

Functions§

absolute
absolute(path: String) -> Lovm2Result<String>
acos
acos(val: f64) -> f64
all
all(collection: &Value) -> Lovm2Result<bool>
any
any(collection: &Value) -> Lovm2Result<bool>
append
append(collection: &mut Value, value: Value) -> Lovm2Result<()>
argn
argn(vm: &mut Vm) -> Lovm2Result<i64>
asin
asin(val: f64) -> f64
atan
atan(val: f64) -> f64
atan2
atan2(val: f64, other: f64) -> f64
basename
basename(path: String) -> Option<String>
call
call(vm: &mut Vm, function_name: String, mut args: Value) -> Lovm2Result<Value>
captures
captures(regex: &Regex, text: String) -> Option<Value>
ceil
ceil(val: f64) -> f64
chr
chr(n: i64) -> Lovm2Result<String>
clamp
clamp(val: f64, min: f64, max: f64) -> f64
contains
contains(haystack: &Value, needle: Value) -> Lovm2Result<bool>
cos
cos(val: f64) -> f64
create_file
create_file(path: String) -> Lovm2Result<File>
create_std_module
Add standard functions to the given vm. If create_vm_with_std is used, this gets loaded automatically.
decode
decode(json: String) -> Lovm2Result<Value>
deep_clone
deep_clone(val: Value) -> Value
delete
delete(collection: &mut Value, key: Value) -> Lovm2Result<bool>
e
e() -> f64
encode
encode(val: Value) -> Lovm2Result<String>
exec
exec(req: &Request) -> Lovm2Result<Response>
exists
exists(path: String) -> bool
filter
filter(vm: &mut Vm, collection: &Value, func_name: String) -> Lovm2Result<Value>
floor
floor(val: f64) -> f64
format
format(vm: &mut Vm) -> Lovm2Result<String>
get
get(collection: &Value, key: Value) -> Lovm2Result<Value>
get_body_as_buffer
get_body_as_buffer(res: &Response) -> Lovm2Result<Buffer>
get_body_as_string
get_body_as_string(res: &Response) -> Lovm2Result<String>
get_status
get_status(res: &Response) -> i64
get_url
get_url(req: &mut Request) -> String
has_data
has_data(buffer: &mut Buffer) -> bool
index_of
index_of(base: String, pat: String) -> Option<i64>
input
is_dir
is_dir(path: String) -> bool
is_match
is_match(regex: &Regex, text: String) -> bool
join
join(base: &Value, sep: String) -> Lovm2Result<String>
len
len(val: &Value) -> Lovm2Result<i64>
list_dir
list_dir(path: String) -> Lovm2Result<Value>
log
log(val: f64, base: f64) -> f64
map
map(vm: &mut Vm, collection: &Value, func_name: String) -> Lovm2Result<Value>
mkdir
mkdir(path: String) -> bool
new_buffer
new_buffer() -> Lovm2Result<Buffer>
new_regex
new_regex(pat: String) -> Lovm2Result<Regex>
new_request
new_request(url: String) -> Request
new_response
new_response() -> Response
open_file
open_file(path: String) -> Lovm2Result<File>
ord
ord(c: String) -> Lovm2Result<i64>
parent
parent(path: String) -> Option<String>
pi
pi() -> f64
pop_vstack
pop_vstack(vm: &mut Vm) -> Lovm2Result<Value>
print
push_vstack
push_vstack(vm: &mut Vm, val: Value) -> ()
read_all
read_all(file: &mut File) -> Lovm2Result<String>
read_line
read_line(buffer: &mut Buffer) -> Lovm2Result<String>
readn
readn(buffer: &mut Buffer, n: i64) -> Lovm2Result<String>
rename
rename(from: String, to: String) -> Lovm2Result<bool>
replace
replace(base: String, pat: String, repl: String) -> String
rmdir
rmdir(path: String) -> bool
round
round(val: f64) -> f64
serve
serve(vm: &mut Vm, host: String, callback: String) -> Lovm2Result<()>
set
set(collection: &mut Value, key: Value, val: Value) -> Lovm2Result<bool>
set_body
set_body(req: &mut Request, mut body: Value) -> Lovm2Result<bool>
set_header
set_header(req: &mut Request, key: String, val: String) -> ()
set_method
set_method(req: &mut Request, method: String) -> Lovm2Result<bool>
sin
sin(val: f64) -> f64
sort
sort(collection: &Value) -> Lovm2Result<Value>
split
split(base: String, sep: String) -> Lovm2Result<Value>
sqrt
sqrt(val: f64) -> f64
tan
tan(val: f64) -> f64
to_lower
to_lower(base: String) -> String
to_upper
to_upper(base: String) -> String
trim
trim(base: String) -> String
unlink
unlink(path: String) -> bool
write_all
write_all(file: &mut File, content: String) -> Lovm2Result<bool>
writes
writes(buffer: &mut Buffer, text: String) -> Lovm2Result<bool>