Trait QoSComponent

pub trait QoSComponent: NerveComponent {
    // Required methods
    fn validate_qos(
        &self,
        qos: QoS,
        buffer_size: usize,
    ) -> Result<(), NerveError>;
    fn expected_drop_rate(&self, qos: QoS, utilization: f64) -> f64;
    fn performance_characteristics(&self, qos: QoS) -> QoSCharacteristics;
    fn qos_to_string(&self, qos: QoS) -> &'static str;
    fn string_to_qos(&self, s: &str) -> Result<QoS, NerveError>;
}
Expand description

QoS component interface

Required Methods§

fn validate_qos(&self, qos: QoS, buffer_size: usize) -> Result<(), NerveError>

Validate QoS configuration

fn expected_drop_rate(&self, qos: QoS, utilization: f64) -> f64

Calculate expected drop rate for QoS level

fn performance_characteristics(&self, qos: QoS) -> QoSCharacteristics

Get QoS performance characteristics

fn qos_to_string(&self, qos: QoS) -> &'static str

Convert QoS level to string

fn string_to_qos(&self, s: &str) -> Result<QoS, NerveError>

Parse string to QoS level

Implementors§