crateApiPythonPythonUtilityEval method
Future<String>
crateApiPythonPythonUtilityEval({
- required String code,
- List<
(String, PyArgument)> ? globals, - List<
(String, PyArgument)> ? locals, - required List<
String> imports,
override
Implementation
@override
Future<String> crateApiPythonPythonUtilityEval(
{required String code,
List<(String, PyArgument)>? globals,
List<(String, PyArgument)>? locals,
required List<String> imports}) {
return handler.executeNormal(NormalTask(
callFfi: (port_) {
final serializer = SseSerializer(generalizedFrbRustBinding);
sse_encode_String(code, serializer);
sse_encode_opt_list_record_string_py_argument(globals, serializer);
sse_encode_opt_list_record_string_py_argument(locals, serializer);
sse_encode_list_String(imports, serializer);
pdeCallFfi(generalizedFrbRustBinding, serializer,
funcId: 23, port: port_);
},
codec: SseCodec(
decodeSuccessData: sse_decode_String,
decodeErrorData: sse_decode_AnyhowException,
),
constMeta: kCrateApiPythonPythonUtilityEvalConstMeta,
argValues: [code, globals, locals, imports],
apiImpl: this,
));
}