pub struct TicketSender(_);
Expand description

Channel sender to send response ratelimit information to the ratelimiter.

This is used by the ratelimiter consumer (such as an API client) once a request has been granted via TicketReceiver.

If a response results in available ratelimit headers, send them via headers to the ratelimiter backend. If a response results in an error - such as a server error or request cancellation - send None.

Implementations§

Send the response’s ratelimit headers to the ratelimiter.

This will allow the ratelimiter to complete the cycle and acknowledge that the request has been completed. This must be done so that the ratelimiter can process information such as whether there’s a global ratelimit.

Errors

Returns the input headers if the ratelimiter has dropped the receiver half. This may happen if the ratelimiter is dropped or if a timeout has occurred.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more