pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn handle_reset_watermarks(
&self,
ctx: impl InvokeContext,
) -> Result<(), Error>;
// Provided methods
fn lifecycle(
&self,
_ctx: impl HandlerContext,
_op: LifecycleOp,
) -> Result<(), Error> { ... }
fn run(
&self,
_ctx: impl HandlerContext,
) -> impl Future<Output = Result<(), Error>> { ... }
fn thread_metrics<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ThreadMetricsStructArrayBuilder<P>, ThreadMetricsStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn current_heap_free(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u64, Error>> { ... }
fn current_heap_used(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u64, Error>> { ... }
fn current_heap_high_watermark(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u64, Error>> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn handle_reset_watermarks( &self, ctx: impl InvokeContext, ) -> Result<(), Error>
Provided Methods§
fn lifecycle( &self, _ctx: impl HandlerContext, _op: LifecycleOp, ) -> Result<(), Error>
fn run( &self, _ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>
fn thread_metrics<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ThreadMetricsStructArrayBuilder<P>, ThreadMetricsStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn current_heap_free( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u64, Error>>
fn current_heap_used( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u64, Error>>
fn current_heap_high_watermark( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u64, Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".