pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 31 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn enabled(&self, ctx: impl ReadContext) -> Result<bool, Error>;
async fn handle_update_pin(
&self,
ctx: impl InvokeContext,
request: UpdatePINRequest<'_>,
) -> Result<(), Error>;
async fn handle_reset_pin<P>(
&self,
ctx: impl InvokeContext,
response: ResetPINResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_enable(&self, ctx: impl InvokeContext) -> Result<(), Error>;
async fn handle_disable(&self, ctx: impl InvokeContext) -> Result<(), Error>;
async fn handle_add_bonus_time(
&self,
ctx: impl InvokeContext,
request: AddBonusTimeRequest<'_>,
) -> Result<(), Error>;
async fn handle_set_screen_daily_time(
&self,
ctx: impl InvokeContext,
request: SetScreenDailyTimeRequest<'_>,
) -> Result<(), Error>;
async fn handle_block_unrated_content(
&self,
ctx: impl InvokeContext,
) -> Result<(), Error>;
async fn handle_unblock_unrated_content(
&self,
ctx: impl InvokeContext,
) -> Result<(), Error>;
async fn handle_set_on_demand_rating_threshold(
&self,
ctx: impl InvokeContext,
request: SetOnDemandRatingThresholdRequest<'_>,
) -> Result<(), Error>;
async fn handle_set_scheduled_content_rating_threshold(
&self,
ctx: impl InvokeContext,
request: SetScheduledContentRatingThresholdRequest<'_>,
) -> Result<(), Error>;
async fn handle_add_block_channels(
&self,
ctx: impl InvokeContext,
request: AddBlockChannelsRequest<'_>,
) -> Result<(), Error>;
async fn handle_remove_block_channels(
&self,
ctx: impl InvokeContext,
request: RemoveBlockChannelsRequest<'_>,
) -> Result<(), Error>;
async fn handle_add_block_applications(
&self,
ctx: impl InvokeContext,
request: AddBlockApplicationsRequest<'_>,
) -> Result<(), Error>;
async fn handle_remove_block_applications(
&self,
ctx: impl InvokeContext,
request: RemoveBlockApplicationsRequest<'_>,
) -> Result<(), Error>;
async fn handle_set_block_content_time_window(
&self,
ctx: impl InvokeContext,
request: SetBlockContentTimeWindowRequest<'_>,
) -> Result<(), Error>;
async fn handle_remove_block_content_time_window(
&self,
ctx: impl InvokeContext,
request: RemoveBlockContentTimeWindowRequest<'_>,
) -> 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 on_demand_ratings<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<RatingNameStructArrayBuilder<P>, RatingNameStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn on_demand_rating_threshold<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn scheduled_content_ratings<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<RatingNameStructArrayBuilder<P>, RatingNameStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn scheduled_content_rating_threshold<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn screen_daily_time(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u32, Error>> { ... }
fn remaining_screen_time(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u32, Error>> { ... }
fn block_unrated(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<bool, Error>> { ... }
fn block_channel_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<BlockChannelStructArrayBuilder<P>, BlockChannelStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn block_application_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<AppInfoStructArrayBuilder<P>, AppInfoStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
fn block_content_time_window<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<TimeWindowStructArrayBuilder<P>, TimeWindowStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn enabled(&self, ctx: impl ReadContext) -> Result<bool, Error>
async fn handle_update_pin( &self, ctx: impl InvokeContext, request: UpdatePINRequest<'_>, ) -> Result<(), Error>
async fn handle_reset_pin<P>(
&self,
ctx: impl InvokeContext,
response: ResetPINResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_enable(&self, ctx: impl InvokeContext) -> Result<(), Error>
async fn handle_disable(&self, ctx: impl InvokeContext) -> Result<(), Error>
async fn handle_add_bonus_time( &self, ctx: impl InvokeContext, request: AddBonusTimeRequest<'_>, ) -> Result<(), Error>
async fn handle_set_screen_daily_time( &self, ctx: impl InvokeContext, request: SetScreenDailyTimeRequest<'_>, ) -> Result<(), Error>
async fn handle_block_unrated_content( &self, ctx: impl InvokeContext, ) -> Result<(), Error>
async fn handle_unblock_unrated_content( &self, ctx: impl InvokeContext, ) -> Result<(), Error>
async fn handle_set_on_demand_rating_threshold( &self, ctx: impl InvokeContext, request: SetOnDemandRatingThresholdRequest<'_>, ) -> Result<(), Error>
async fn handle_set_scheduled_content_rating_threshold( &self, ctx: impl InvokeContext, request: SetScheduledContentRatingThresholdRequest<'_>, ) -> Result<(), Error>
async fn handle_add_block_channels( &self, ctx: impl InvokeContext, request: AddBlockChannelsRequest<'_>, ) -> Result<(), Error>
async fn handle_remove_block_channels( &self, ctx: impl InvokeContext, request: RemoveBlockChannelsRequest<'_>, ) -> Result<(), Error>
async fn handle_add_block_applications( &self, ctx: impl InvokeContext, request: AddBlockApplicationsRequest<'_>, ) -> Result<(), Error>
async fn handle_remove_block_applications( &self, ctx: impl InvokeContext, request: RemoveBlockApplicationsRequest<'_>, ) -> Result<(), Error>
async fn handle_set_block_content_time_window( &self, ctx: impl InvokeContext, request: SetBlockContentTimeWindowRequest<'_>, ) -> Result<(), Error>
async fn handle_remove_block_content_time_window( &self, ctx: impl InvokeContext, request: RemoveBlockContentTimeWindowRequest<'_>, ) -> 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 on_demand_ratings<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<RatingNameStructArrayBuilder<P>, RatingNameStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn on_demand_rating_threshold<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn scheduled_content_ratings<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<RatingNameStructArrayBuilder<P>, RatingNameStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn scheduled_content_rating_threshold<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn screen_daily_time( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>
fn remaining_screen_time( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>
fn block_unrated( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>
fn block_channel_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<BlockChannelStructArrayBuilder<P>, BlockChannelStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn block_application_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<AppInfoStructArrayBuilder<P>, AppInfoStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
fn block_content_time_window<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<TimeWindowStructArrayBuilder<P>, TimeWindowStructBuilder<P>>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".