pub struct StreamProfile { /* private fields */ }Expand description
High-level description of stream behavior selected by callers.
The profile is immutable and compiles into a concrete runtime configuration.
Implementations§
Source§impl StreamProfile
impl StreamProfile
Sourcepub fn auto() -> StreamProfile
pub fn auto() -> StreamProfile
Returns the safe default profile (Auto).
Sourcepub fn realtime() -> StreamProfile
pub fn realtime() -> StreamProfile
Low-latency profile that prioritizes speedy delivery over smoothing.
Sourcepub fn install() -> StreamProfile
pub fn install() -> StreamProfile
Install profile that prioritizes smoothness and resilience.
Sourcepub fn with_weights(
intent: StreamIntent,
latency_weight: u8,
resilience_weight: u8,
) -> StreamProfile
pub fn with_weights( intent: StreamIntent, latency_weight: u8, resilience_weight: u8, ) -> StreamProfile
Creates a profile with explicit weights; useful for testing or advanced audience.
Sourcepub fn compile(self) -> Result<CompiledStreamProfile, ProfileError>
pub fn compile(self) -> Result<CompiledStreamProfile, ProfileError>
Normalizes and compiles the profile into a runtime configuration.
§Guarantees
- Validates each weight and rejects unsafe combinations with explicit errors.
- Produces a deterministic
config_idderived from the normalized weights and intent.
Sourcepub fn intent(&self) -> StreamIntent
pub fn intent(&self) -> StreamIntent
Returns the declared intent of the profile (Auto/Realtime/Install).
Trait Implementations§
Source§impl Clone for StreamProfile
impl Clone for StreamProfile
Source§fn clone(&self) -> StreamProfile
fn clone(&self) -> StreamProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamProfile
impl Debug for StreamProfile
Source§impl Default for StreamProfile
impl Default for StreamProfile
Source§fn default() -> StreamProfile
fn default() -> StreamProfile
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StreamProfile
impl RefUnwindSafe for StreamProfile
impl Send for StreamProfile
impl Sync for StreamProfile
impl Unpin for StreamProfile
impl UnwindSafe for StreamProfile
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