pub struct index_ring_t<T> { /* private fields */ }Implementations§
Source§impl<T> index_ring_t<T>
impl<T> index_ring_t<T>
pub fn new(ring_capacity: usize, start_seq: u64) -> Self
pub fn add_item(&mut self, seq: u64, item: T) -> RESULT
pub fn remove_item(&mut self, seq: u64) -> RESULT
pub fn remove_item_before_seq(&mut self, seq: u64, force: bool) -> RESULT
pub fn get_index_by_seq(&self, seq: u64) -> usize
pub fn get_item_by_seq(&mut self, seq: u64) -> Option<&mut T>
pub fn get_head_item(&mut self) -> Option<&mut T>
pub fn get_head_index(&self) -> usize
pub fn get_tail_index(&self) -> usize
pub fn get_head_seq(&self) -> u64
pub fn get_tail_seq(&self) -> u64
pub fn get_ring_len(&self) -> usize
pub fn get_ring_capacity(&self) -> usize
pub fn get_head_item_state(&self) -> EItemState
pub fn get_item_state(&self, seq: u64) -> EItemState
Sourcepub fn get_recv_item_stats(&self) -> (u64, u64)
pub fn get_recv_item_stats(&self) -> (u64, u64)
返回收到的报文以及期望收到的报文数量,计算丢包率
pub fn clear_recv_stats(&mut self)
pub fn get_loss_count(&self) -> u64
pub fn get_loss_rate(&self) -> f32
pub fn clear(&mut self)
pub fn to_string(&self) -> String
Auto Trait Implementations§
impl<T> Freeze for index_ring_t<T>
impl<T> RefUnwindSafe for index_ring_t<T>where
T: RefUnwindSafe,
impl<T> Send for index_ring_t<T>where
T: Send,
impl<T> Sync for index_ring_t<T>where
T: Sync,
impl<T> Unpin for index_ring_t<T>where
T: Unpin,
impl<T> UnwindSafe for index_ring_t<T>where
T: UnwindSafe,
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