pub struct Inference(/* private fields */);Expand description
Authenticated customer connection; infrastructure remains entirely service-owned.
Implementations§
Source§impl Inference
impl Inference
Sourcepub async fn connect(
endpoint: &str,
api_key: &str,
ca_pem: &[u8],
) -> Result<Self, Error>
pub async fn connect( endpoint: &str, api_key: &str, ca_pem: &[u8], ) -> Result<Self, Error>
Connect using an explicit trusted CA, ambient WebPKI roots, and bounded TLS/RPC deadlines.
§Errors
Rejects non-HTTPS endpoints, invalid credentials and failed TLS setup.
Sourcepub fn context(&self, model: impl Into<String>) -> CreateContext
pub fn context(&self, model: impl Into<String>) -> CreateContext
Start an exact immutable Context creation with a stable pre-dispatch identity.
Sourcepub async fn attach(&self, revision: [u8; 32]) -> Result<Context, Error>
pub async fn attach(&self, revision: [u8; 32]) -> Result<Context, Error>
Authenticate and attach to an existing immutable retained revision.
§Errors
Rejects unknown/unretained revisions or an invalid service response.
Sourcepub fn evaluation(&self, spec: EvaluationSpec) -> CreateEvaluation
pub fn evaluation(&self, spec: EvaluationSpec) -> CreateEvaluation
Prepare one immutable evaluation admission with a caller-known identity.
Sourcepub fn recover_evaluation(&self, evaluation_id: [u8; 16]) -> Evaluation
pub fn recover_evaluation(&self, evaluation_id: [u8; 16]) -> Evaluation
Recover one previously admitted evaluation without admitting new work.
Sourcepub async fn models(&self) -> Result<Vec<ModelCapability>, Error>
pub async fn models(&self) -> Result<Vec<ModelCapability>, Error>
Discover exact model revisions and the customer features currently admitted for them.
§Errors
Rejects unauthenticated, malformed, duplicate, or unbounded capability responses.
Sourcepub fn recover_run(&self, run_id: [u8; 16]) -> Run
pub fn recover_run(&self, run_id: [u8; 16]) -> Run
Recover one previously admitted Run by its caller-known identity.
Sourcepub fn recover_warm(&self, commitment: [u8; 32]) -> WarmContext
pub fn recover_warm(&self, commitment: [u8; 32]) -> WarmContext
Recover a previously admitted warm commitment without creating another.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Inference
impl !UnwindSafe for Inference
impl Freeze for Inference
impl Send for Inference
impl Sync for Inference
impl Unpin for Inference
impl UnsafeUnpin for Inference
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request