pub struct TicketReceiver(/* private fields */);
Expand description
Channel receiver to wait for availability of a ratelimit ticket.
This is used by the ratelimiter consumer (such as an API client) to wait for an available ratelimit ticket.
Once one is available, a TicketSender
will be produced which can be used to
send the associated HTTP response’s ratelimit headers.
Trait Implementations§
source§impl Debug for TicketReceiver
impl Debug for TicketReceiver
source§impl Future for TicketReceiver
impl Future for TicketReceiver
source§type Output = Result<TicketSender, RecvError>
type Output = Result<TicketSender, RecvError>
The type of value produced on completion.
Auto Trait Implementations§
impl Freeze for TicketReceiver
impl !RefUnwindSafe for TicketReceiver
impl Send for TicketReceiver
impl Sync for TicketReceiver
impl Unpin for TicketReceiver
impl !UnwindSafe for TicketReceiver
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more