pub struct InferConfig {
pub flavor: InferFlavor,
pub mode: InferMode,
pub probe_timeout: Duration,
pub probe_port: Option<u16>,
pub allowed_ports: Option<(u16, u16)>,
pub deep_timeout: Duration,
}Expand description
One adapter’s configuration.
Fields§
§flavor: InferFlavorServer software.
mode: InferModeAdopted or managed.
probe_timeout: DurationPer-request timeout of probes.
probe_port: Option<u16>Port the capability probe asks (the flavor’s conventional port when absent). Instances carry their own ports.
allowed_ports: Option<(u16, u16)>Inclusive port range instances may use. Checked before anything is probed: a spec naming a port outside it never causes a connection.
deep_timeout: DurationTimeout of InferRuntime::deep_health
(a cold model can take minutes to answer its first token).
Implementations§
Source§impl InferConfig
impl InferConfig
Sourcepub fn with_port_range(self, lo: u16, hi: u16) -> Self
pub fn with_port_range(self, lo: u16, hi: u16) -> Self
Limit instances to ports in lo..=hi.
Sourcepub fn with_probe_port(self, port: u16) -> Self
pub fn with_probe_port(self, port: u16) -> Self
Probe a different port for capabilities.
Sourcepub fn adopted(flavor: InferFlavor) -> Self
pub fn adopted(flavor: InferFlavor) -> Self
An adopting adapter.
Sourcepub fn managed(flavor: InferFlavor, cfg: ManagedConfig) -> Self
pub fn managed(flavor: InferFlavor, cfg: ManagedConfig) -> Self
A managing adapter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InferConfig
impl RefUnwindSafe for InferConfig
impl Send for InferConfig
impl Sync for InferConfig
impl Unpin for InferConfig
impl UnsafeUnpin for InferConfig
impl UnwindSafe for InferConfig
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> 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> 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 more