Skip to main content

Divisible

Trait Divisible 

Source
pub trait Divisible: Sync {
    // Required methods
    fn want(&self, slot: u8, units: u32);
    fn release(&self, slot: u8);
    fn grant(&self, slot: u8) -> u32;
    fn register(&self, slot: u8, waker: &Waker);
}
Expand description

The object-safe view of a Budget a Claimant and a node’s claims table go through, so neither names N.

Required Methods§

Source

fn want(&self, slot: u8, units: u32)

State slot’s demand.

Source

fn release(&self, slot: u8)

Drop slot’s demand and grant.

Source

fn grant(&self, slot: u8) -> u32

slot’s current grant.

Source

fn register(&self, slot: u8, waker: &Waker)

Park waker until the next rebalance that moves slot’s grant.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<const N: usize> Divisible for Budget<N>