pub struct CreditAccount {
pub max_credits: i64,
/* private fields */
}Expand description
Credit-based flow control for a single producer-consumer pair.
The consumer grants credits to the producer; the producer sends one unit of work per credit and decrements the credit balance.
Fields§
§max_credits: i64Maximum credits the consumer will grant at once.
Implementations§
Source§impl CreditAccount
impl CreditAccount
Trait Implementations§
Source§impl Clone for CreditAccount
impl Clone for CreditAccount
Source§fn clone(&self) -> CreditAccount
fn clone(&self) -> CreditAccount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CreditAccount
impl RefUnwindSafe for CreditAccount
impl Send for CreditAccount
impl Sync for CreditAccount
impl Unpin for CreditAccount
impl UnsafeUnpin for CreditAccount
impl UnwindSafe for CreditAccount
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request