luakit

package
v1.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B2L

func B2L(b []byte) lua.LString

func B2S

func B2S(b []byte) string

func Check

func Check[T any](L *lua.LState, val lua.LValue) (t T)

func Copier added in v1.5.4

func Copier(L *lua.LState, field reflect.Value, val lua.LValue) error

func Format

func Format(L *lua.LState, seek int) string

func IntOr added in v1.5.1

func IntOr(tab *lua.LTable, key string, d int) int

func NewFmtL

func NewFmtL(L *lua.LState) int

func NewIntL added in v1.5.1

func NewIntL(L *lua.LState) int

func NewMapL

func NewMapL(L *lua.LState) int

func NewSliceL

func NewSliceL(L *lua.LState) int

func Preload

func Preload(ip Preloader)

func PreloadModule

func PreloadModule(L *lua.LState)

func PrettyJson

func PrettyJson(lv lua.LValue) []byte

func PrettyJsonL

func PrettyJsonL(L *lua.LState) int

func S2B

func S2B(s string) (b []byte)

func S2L

func S2L(s string) lua.LString

func StringOr added in v1.5.2

func StringOr(tab *lua.LTable, key string, d string) string

func TableTo added in v1.5.4

func TableTo(L *lua.LState, tab *lua.LTable, v any) error

Types

type Map

type Map[K comparable, V any] map[K]V

func NewMap

func NewMap[K comparable, V any](size int) Map[K, V]

func (Map[K, V]) Decode

func (m Map[K, V]) Decode(data []byte) error

func (Map[K, V]) Index

func (m Map[K, V]) Index(L *lua.LState, key string) lua.LValue

func (Map[K, V]) Meta

func (m Map[K, V]) Meta(L *lua.LState, key lua.LValue) lua.LValue

func (Map[K, V]) NewIndex

func (m Map[K, V]) NewIndex(L *lua.LState, key string, value lua.LValue)

func (Map[K, V]) NewMeta

func (m Map[K, V]) NewMeta(L *lua.LState, key lua.LValue, val lua.LValue)

func (Map[K, V]) String

func (m Map[K, V]) String() string

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func LuaVM

func LuaVM(debug bool, callback ...func(*lua.LState)) *Pool

func (*Pool) Clone

func (p *Pool) Clone(co *lua.LState) *lua.LState

func (*Pool) Get

func (p *Pool) Get() *lua.LState

func (*Pool) Put

func (p *Pool) Put(co *lua.LState)

type Preloader

type Preloader interface {
	Set(string, lua.LValue)
	SetGlobal(string, lua.LValue)
}

type Slice

type Slice[T any] []T

func (Slice[T]) AssertFloat64

func (s Slice[T]) AssertFloat64() (float64, bool)

func (Slice[T]) AssertFunction

func (s Slice[T]) AssertFunction() (*lua.LFunction, bool)

func (Slice[T]) AssertString

func (s Slice[T]) AssertString() (string, bool)

func (*Slice[T]) Get

func (s *Slice[T]) Get(idx int) (t T, ok bool)

func (Slice[T]) Hijack

func (s Slice[T]) Hijack(fsm *lua.CallFrameFSM) bool

func (Slice[T]) Index

func (s Slice[T]) Index(L *lua.LState, key string) lua.LValue

func (*Slice[T]) Len

func (s *Slice[T]) Len() int

func (Slice[T]) Meta

func (s Slice[T]) Meta(L *lua.LState, key lua.LValue) lua.LValue

func (Slice[T]) NewMeta

func (s Slice[T]) NewMeta(L *lua.LState, key lua.LValue, val lua.LValue)

func (*Slice[T]) Set

func (s *Slice[T]) Set(idx int, val lua.LValue) error

func (Slice[T]) String

func (s Slice[T]) String() string

func (Slice[T]) Type

func (s Slice[T]) Type() lua.LValueType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL