pub struct BandwidthAwareValidator { /* private fields */ }Expand description
Bandwidth-aware path validation coordinator
Implementations§
Source§impl BandwidthAwareValidator
impl BandwidthAwareValidator
Sourcepub fn new(config: BandwidthValidationConfig) -> Self
pub fn new(config: BandwidthValidationConfig) -> Self
Create a new bandwidth-aware validator
Sourcepub async fn start_validation(
&self,
target_address: SocketAddr,
priority: ValidationPriority,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn start_validation( &self, target_address: SocketAddr, priority: ValidationPriority, ) -> Result<(), Box<dyn Error + Send + Sync>>
Start path validation with bandwidth awareness
Sourcepub async fn record_packet_sent(
&self,
target_address: SocketAddr,
packet_size: usize,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn record_packet_sent( &self, target_address: SocketAddr, packet_size: usize, ) -> Result<(), Box<dyn Error + Send + Sync>>
Record validation packet transmission
Sourcepub async fn record_packet_received(
&self,
target_address: SocketAddr,
rtt: Duration,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn record_packet_received( &self, target_address: SocketAddr, rtt: Duration, ) -> Result<(), Box<dyn Error + Send + Sync>>
Record validation packet reception
Sourcepub async fn complete_validation(
&self,
target_address: SocketAddr,
success: bool,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn complete_validation( &self, target_address: SocketAddr, success: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
Complete validation session
Sourcepub async fn get_stats(&self) -> BandwidthValidationStats
pub async fn get_stats(&self) -> BandwidthValidationStats
Get bandwidth validation statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BandwidthAwareValidator
impl RefUnwindSafe for BandwidthAwareValidator
impl Send for BandwidthAwareValidator
impl Sync for BandwidthAwareValidator
impl Unpin for BandwidthAwareValidator
impl UnwindSafe for BandwidthAwareValidator
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