Struct jsonrpsee_core::client::RequestIdManager
source · pub struct RequestIdManager { /* private fields */ }
Expand description
Keep track of request IDs.
Implementations§
source§impl RequestIdManager
impl RequestIdManager
sourcepub fn new(id_kind: IdKind) -> Self
pub fn new(id_kind: IdKind) -> Self
Create a new RequestIdGuard
with the provided concurrency limit.
sourcepub fn next_request_id(&self) -> Id<'static>
pub fn next_request_id(&self) -> Id<'static>
Attempts to get the next request ID.
Fails if request limit has been exceeded.
sourcepub fn as_id_kind(&self) -> IdKind
pub fn as_id_kind(&self) -> IdKind
Get a handle to the IdKind
.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RequestIdManager
impl RefUnwindSafe for RequestIdManager
impl Send for RequestIdManager
impl Sync for RequestIdManager
impl Unpin for RequestIdManager
impl UnwindSafe for RequestIdManager
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