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 with_weights(
intent: StreamIntent,
latency_weight: u8,
resilience_weight: u8,
) -> Self
pub fn with_weights( intent: StreamIntent, latency_weight: u8, resilience_weight: u8, ) -> Self
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.
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
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