pub struct ShardedNodeQueue { /* private fields */ }Expand description
分片节点队列 - 支持高并发,IPv4 和 IPv6 节点分开存储
Implementations§
Source§impl ShardedNodeQueue
impl ShardedNodeQueue
Sourcepub fn pop_batch(
&self,
count: usize,
filter_ipv6: Option<bool>,
) -> Vec<NodeTuple>
pub fn pop_batch( &self, count: usize, filter_ipv6: Option<bool>, ) -> Vec<NodeTuple>
批量弹出节点
§Arguments
count- 需要获取的节点数量filter_ipv6- 如果为Some(true),只从 IPv6 队列获取;如果为Some(false),只从 IPv4 队列获取;如果为None,从两个队列混合获取
Auto Trait Implementations§
impl Freeze for ShardedNodeQueue
impl RefUnwindSafe for ShardedNodeQueue
impl Send for ShardedNodeQueue
impl Sync for ShardedNodeQueue
impl Unpin for ShardedNodeQueue
impl UnwindSafe for ShardedNodeQueue
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