NativeIsolateBindings class abstract

Abstract interface over the native Isolate bridge.

All methods are Future-based because the Isolate round-trip is inherently asynchronous. Unlike WasmBindings which returns raw JSON, NativeIsolateBindings returns already-decoded domain types because Isolate.spawn creates same-group isolates that can send arbitrary @immutable objects directly.

Implementers

Constructors

NativeIsolateBindings()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() Future<void>
Disposes the background Isolate and frees resources.
init() Future<bool>
Initializes the background Isolate.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveFutures(Map<int, Object?> results, {Map<int, String>? errors}) Future<MontyProgress>
Resolves one or more pending futures with their results, and optionally errors.
restore(Uint8List data) Future<void>
Restores interpreter state from snapshot data.
resume(Object? returnValue) Future<MontyProgress>
Resumes a paused execution with returnValue.
resumeAsFuture() Future<MontyProgress>
Converts the current pending call into a future and continues execution.
resumeWithError(String errorMessage) Future<MontyProgress>
Resumes a paused execution by raising an error with errorMessage.
run(String code, {MontyLimits? limits, String? scriptName}) Future<MontyResult>
Runs Python code to completion in the background Isolate.
snapshot() Future<Uint8List>
Captures the current interpreter state as a binary snapshot.
start(String code, {List<String>? externalFunctions, MontyLimits? limits, String? scriptName}) Future<MontyProgress>
Starts iterative execution of code in the background Isolate.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited