pub struct JitCompiler {
pub jit_port_types: RwLock<HashMap<u64, Arc<JitPortType>>>,
pub jit_gadget_types: RwLock<HashMap<u64, Arc<JitGadgetType>>>,
pub terminal_error_model_types: RwLock<HashMap<u64, Arc<ErrorModelType>>>,
pub current_gid: AtomicU64,
pub gadgets: RwLock<HashMap<u64, JitGadgetState>>,
/* private fields */
}Fields§
§jit_port_types: RwLock<HashMap<u64, Arc<JitPortType>>>§jit_gadget_types: RwLock<HashMap<u64, Arc<JitGadgetType>>>§terminal_error_model_types: RwLock<HashMap<u64, Arc<ErrorModelType>>>§current_gid: AtomicU64§gadgets: RwLock<HashMap<u64, JitGadgetState>>Implementations§
Source§impl JitCompiler
impl JitCompiler
pub fn new() -> Arc<Self> ⓘ
Sourcepub async fn reset(&self)
pub async fn reset(&self)
it is unsafe to call reset while some other async operations are ongoing
Sourcepub async fn reset_library(&self)
pub async fn reset_library(&self)
Clear registered types and compiled gadgets after all ongoing operations have stopped.
pub async fn contains_gid(&self, gid: u64) -> bool
pub async fn load_library(&self, library: JitLibrary)
pub async fn compile( self: &Arc<Self>, instruction: JitInstruction, token: CancellationToken, ) -> (Gadget, CheckModelType, CheckModel, impl Future<Output = (ErrorModelType, ErrorModel)> + Send + use<>)
Auto Trait Implementations§
impl !Freeze for JitCompiler
impl !RefUnwindSafe for JitCompiler
impl Forget for JitCompiler
impl Move for JitCompiler
impl Send for JitCompiler
impl Sync for JitCompiler
impl Unpin for JitCompiler
impl UnsafeUnpin for JitCompiler
impl UnwindSafe for JitCompiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request