pub trait JitController:
Send
+ Sync
+ 'static {
// Required methods
fn load_library<'life0, 'async_trait>(
&'life0 self,
request: Request<JitLibrary>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unload<'life0, 'async_trait>(
&'life0 self,
request: Request<UnloadJitLibrary>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn execute<'life0, 'async_trait>(
&'life0 self,
request: Request<JitInstruction>,
) -> Pin<Box<dyn Future<Output = Result<Response<ExecuteResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn batch_execute<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchExecuteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchExecuteResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn decode<'life0, 'async_trait>(
&'life0 self,
request: Request<Outcomes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Readouts>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn batch_decode<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchOutcomes>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchReadouts>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reset<'life0, 'async_trait>(
&'life0 self,
request: Request<ResetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with JitControllerServer.
Required Methods§
Sourcefn load_library<'life0, 'async_trait>(
&'life0 self,
request: Request<JitLibrary>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_library<'life0, 'async_trait>(
&'life0 self,
request: Request<JitLibrary>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
load the library, preferably offline (well before the circuit runs) but can also run online to enable the capability of very dynamic behaviors
Sourcefn unload<'life0, 'async_trait>(
&'life0 self,
request: Request<UnloadJitLibrary>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unload<'life0, 'async_trait>(
&'life0 self,
request: Request<UnloadJitLibrary>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
remove certain gadgets, check models or error models to free up resources
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
request: Request<JitInstruction>,
) -> Pin<Box<dyn Future<Output = Result<Response<ExecuteResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: Request<JitInstruction>,
) -> Pin<Box<dyn Future<Output = Result<Response<ExecuteResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
return the id of the new instruction (which creates an instance of a gadget, a check model or an error model)
Sourcefn batch_execute<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchExecuteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchExecuteResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn batch_execute<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchExecuteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchExecuteResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
execute multiple instructions in batch, respecting dependencies between them. all instructions must specify a non-zero gid. Dependencies (via connectors) are validated: referenced gids must either exist in this batch or have been previously executed. The entire batch is rejected if any validation fails.
Sourcefn decode<'life0, 'async_trait>(
&'life0 self,
request: Request<Outcomes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Readouts>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn decode<'life0, 'async_trait>(
&'life0 self,
request: Request<Outcomes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Readouts>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
input the measurement outcomes of a gadget and return the logical readouts. note that the readouts generally depend on adjacent gadgets’ outcomes so it may not return immediately (unless the number of readouts are zero)
Sourcefn batch_decode<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchOutcomes>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchReadouts>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn batch_decode<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchOutcomes>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchReadouts>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
decode multiple gadgets concurrently. All decode operations run in parallel, which is critical for window decoding where earlier decodes may depend on later ones. Returns readouts in the same order as the input outcomes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".