pub enum LatencyClass {
Realtime,
Interactive,
Background,
Batch,
}Expand description
Latency class requirements - how fast do you need responses?
This is about user experience and system architecture, not jurisdiction.
A cloud provider with low network latency can satisfy Interactive
even if it’s in a different country.
Variants§
Realtime
Real-time responses (<100ms) - interactive UI, streaming, gaming. Often requires local inference or edge deployment.
Interactive
Interactive responses (<2s) - user is actively waiting. Regional cloud providers typically suffice.
Background
Background processing (<30s) - async tasks, user can context-switch. Any reliable provider works.
Batch
Batch processing (minutes ok) - overnight jobs, bulk operations. Optimize for cost over speed.
Implementations§
Source§impl LatencyClass
impl LatencyClass
Sourcepub fn max_latency_ms(self) -> u32
pub fn max_latency_ms(self) -> u32
Returns the maximum acceptable latency in milliseconds.
Sourcepub fn satisfied_by(self, provider_latency_ms: u32) -> bool
pub fn satisfied_by(self, provider_latency_ms: u32) -> bool
Returns whether a provider’s typical latency satisfies this class.
Trait Implementations§
Source§impl Clone for LatencyClass
impl Clone for LatencyClass
Source§fn clone(&self) -> LatencyClass
fn clone(&self) -> LatencyClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more