ffi

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

Error is an owned handle for a Monty error object.

func (*Error) Close

func (e *Error) Close()

Close frees the owned error handle.

func (*Error) Display

func (e *Error) Display(format string, color bool) string

Display returns a formatted string for the error handle.

func (*Error) JSON

func (e *Error) JSON() []byte

JSON returns the structured JSON summary for the error handle.

type OpResult

type OpResult struct {
	Progress        *Progress
	ProgressPayload []byte
	Repl            *Repl
	Error           *Error
	Prints          string
}

OpResult wraps start/resume/feed operations.

func LoadProgress

func LoadProgress(data []byte) OpResult

LoadProgress restores a serialized progress handle.

type Progress

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

Progress is an owned handle for an in-flight Monty snapshot.

func (*Progress) Close

func (p *Progress) Close()

Close frees the owned progress handle.

func (*Progress) Describe

func (p *Progress) Describe() ([]byte, *Error)

Describe returns the JSON description for the progress handle.

func (*Progress) Dump

func (p *Progress) Dump() ([]byte, *Error)

Dump serializes the progress handle.

func (*Progress) ResumeCall

func (p *Progress) ResumeCall(result []byte) OpResult

ResumeCall resumes a function or OS-call progress handle.

func (*Progress) ResumeFutures

func (p *Progress) ResumeFutures(result []byte) OpResult

ResumeFutures resumes a future-resolution progress handle.

func (*Progress) ResumeLookup

func (p *Progress) ResumeLookup(result []byte) OpResult

ResumeLookup resumes a name-lookup progress handle.

func (*Progress) TakeRepl

func (p *Progress) TakeRepl() ReplResult

TakeRepl extracts a REPL handle from a progress object.

type Repl

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

Repl is an owned handle for a Monty REPL session.

func (*Repl) Close

func (r *Repl) Close()

Close frees the owned REPL handle.

func (*Repl) Dump

func (r *Repl) Dump() ([]byte, *Error)

Dump serializes the REPL handle.

func (*Repl) FeedStart

func (r *Repl) FeedStart(code []byte, options []byte) OpResult

FeedStart begins execution of a REPL snippet.

type ReplResult

type ReplResult struct {
	Repl  *Repl
	Error *Error
}

ReplResult wraps REPL construction or load results.

func LoadRepl

func LoadRepl(data []byte) ReplResult

LoadRepl restores a serialized REPL.

func NewRepl

func NewRepl(options []byte) ReplResult

NewRepl constructs a new REPL from JSON options.

type Runner

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

Runner is an owned handle for a compiled Monty runner.

func (*Runner) Close

func (r *Runner) Close()

Close frees the owned runner handle.

func (*Runner) Dump

func (r *Runner) Dump() ([]byte, *Error)

Dump serializes the runner handle.

func (*Runner) Start

func (r *Runner) Start(options []byte) OpResult

Start begins runner execution with JSON-encoded start options.

func (*Runner) TypeCheck

func (r *Runner) TypeCheck(prefix []byte) *Error

TypeCheck runs static type checking and returns an owned error handle on failure.

type RunnerResult

type RunnerResult struct {
	Runner *Runner
	Error  *Error
}

RunnerResult wraps runner construction or load results.

func LoadRunner

func LoadRunner(data []byte) RunnerResult

LoadRunner restores a runner from a serialized byte slice.

func NewRunner

func NewRunner(code []byte, options []byte) RunnerResult

NewRunner constructs a compiled runner from source code plus JSON options.

Jump to

Keyboard shortcuts

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