Skip to main content

SlotReleaseContext

Trait SlotReleaseContext 

Source
pub trait SlotReleaseContext: Send + Sync {
    type SlotKind: SlotKind;

    // Required methods
    fn permit(&self) -> &SlotSupplierPermit;
    fn info(&self) -> Option<&<Self::SlotKind as SlotKind>::Info>;

    // Provided method
    fn get_metrics_meter(&self) -> Option<TemporalMeter> { ... }
}
Expand description

Context for slots being released.

Required Associated Types§

Source

type SlotKind: SlotKind

The kind of slot being marked released.

Required Methods§

Source

fn permit(&self) -> &SlotSupplierPermit

The slot permit that is being used

Source

fn info(&self) -> Option<&<Self::SlotKind as SlotKind>::Info>

Returns the info of slot that was released, if it was used

Provided Methods§

Source

fn get_metrics_meter(&self) -> Option<TemporalMeter>

Returns the metrics meter if metrics are enabled

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§