pub struct InferenceRegistry { /* private fields */ }Implementations§
Source§impl InferenceRegistry
impl InferenceRegistry
pub fn with_config(config: RegistryConfig) -> Self
pub fn try_acquire_control( self: &Arc<Self>, ) -> Result<OwnedSemaphorePermit, RegistryError>
pub fn begin( &self, ) -> Result<(String, Receiver<Option<TerminalOutcome>>), RegistryError>
pub fn begin_for_run( &self, run_id: Option<String>, request_id: Option<String>, ) -> Result<(String, Receiver<Option<TerminalOutcome>>), RegistryError>
pub fn begin_with_id( &self, inference_id: &str, ) -> Result<Receiver<Option<TerminalOutcome>>, RegistryError>
Sourcepub fn active_for_run(&self, run_id: &str) -> Vec<(String, Option<String>)>
pub fn active_for_run(&self, run_id: &str) -> Vec<(String, Option<String>)>
Active inference identities attributed to one run, sorted for stable receipt selection.
pub fn attach_backend( &self, inference_id: &str, task: JoinHandle<()>, ) -> Result<(), RegistryError>
Sourcepub fn backend_terminated(&self, inference_id: &str)
pub fn backend_terminated(&self, inference_id: &str)
Called only after the actual backend future has returned.
pub fn is_active(&self, inference_id: &str) -> bool
pub fn complete(&self, inference_id: &str) -> bool
pub fn terminal_outcome(&self, inference_id: &str) -> Option<TerminalOutcome>
pub fn reserve_deadline( self: &Arc<Self>, inference_id: &str, ) -> Result<DeadlineReservation, DeadlineReservationError>
pub async fn schedule_deadline<F, Fut>( self: &Arc<Self>, inference_id: &str, timeout: Duration, acknowledgement: F, ) -> Result<InferenceControlStatus, DeadlineReservationError>
pub async fn control<F>( &self, inference_id: &str, cause: ControlCause, acknowledgement: F, ) -> InferenceControlStatus
pub fn counts(&self) -> (usize, usize)
pub fn orphan_count(&self) -> usize
Sourcepub fn abandon(&self, inference_id: &str)
pub fn abandon(&self, inference_id: &str)
Roll back a start whose infer.started frame could not be delivered.
Sourcepub fn abort_after_started_admission(&self, inference_id: &str)
pub fn abort_after_started_admission(&self, inference_id: &str)
Abort a backend after infer.started may already have entered the
socket sink, retaining a terminal tombstone so a later flush can never
expose an ID that control RPCs report as unknown.
Sourcepub fn abort_owned_backend(&self, inference_id: &str)
pub fn abort_owned_backend(&self, inference_id: &str)
Abort this handler’s owned backend while preserving an existing terminal outcome. If no control has terminalized the entry yet, publish a completed tombstone first so any frame already admitted to the socket can never expose an unknown ID. If control already moved the JoinHandle into a tombstone, detach and abort it there and release its orphan charge.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for InferenceRegistry
impl !RefUnwindSafe for InferenceRegistry
impl !UnwindSafe for InferenceRegistry
impl Send for InferenceRegistry
impl Sync for InferenceRegistry
impl Unpin for InferenceRegistry
impl UnsafeUnpin for InferenceRegistry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> ⓘ
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> ⓘ
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 more