EmbeddingPassDescriptor<C extends Object> class
final
Everything core needs to build an engine's EmbeddingPass, with the
engine's own configuration C opaque to core (D2): a new engine knob never
needs a core release.
On native the descriptor crosses to the worker isolate, so config must be
sendable within the isolate group (no Pointer, no ReceivePort, no open
handle), and the factory must be a top-level or static function — a
tear-off, never a closure over local state. build is the only way core
uses the factory; it stays private so a supertype view
(EmbeddingPassDescriptor<Object>) never reads a contravariant field.
Constructors
- EmbeddingPassDescriptor({required String engineTag, required EmbeddingPass factory(C config), required C config, required PreferredBackend? activeBackend})
-
const
Properties
- activeBackend → PreferredBackend?
-
Pre-load placement claim. The pass's loaded activeBackend takes
precedence. Retained as fallback for providers using the legacy default;
a provider advertising GPU must report placement from load instead.
Null means unknown, never CPU.
final
- config → C
-
The engine's configuration, handed to the factory.
final
- engineTag → String
-
The engine's name in messages and errors, e.g.
LiteRT.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → EmbeddingPass - Builds the pass. Core calls this once, on the isolate that will run it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited