Skip to main content

ClusterAsyncHandler

Trait ClusterAsyncHandler 

Source
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§

Source

const CLUSTER: Cluster<'static>

The cluster-metadata corresponding to this handler trait.

Required Methods§

Source

fn dataver(&self) -> u32

Source

fn dataver_changed(&self)

Source

async fn enabled(&self, ctx: impl ReadContext) -> Result<bool, Error>

Source

async fn handle_update_pin( &self, ctx: impl InvokeContext, request: UpdatePINRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_reset_pin<P>( &self, ctx: impl InvokeContext, response: ResetPINResponseBuilder<P>, ) -> Result<P, Error>

Source

async fn handle_enable(&self, ctx: impl InvokeContext) -> Result<(), Error>

Source

async fn handle_disable(&self, ctx: impl InvokeContext) -> Result<(), Error>

Source

async fn handle_add_bonus_time( &self, ctx: impl InvokeContext, request: AddBonusTimeRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_set_screen_daily_time( &self, ctx: impl InvokeContext, request: SetScreenDailyTimeRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_block_unrated_content( &self, ctx: impl InvokeContext, ) -> Result<(), Error>

Source

async fn handle_unblock_unrated_content( &self, ctx: impl InvokeContext, ) -> Result<(), Error>

Source

async fn handle_set_on_demand_rating_threshold( &self, ctx: impl InvokeContext, request: SetOnDemandRatingThresholdRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_set_scheduled_content_rating_threshold( &self, ctx: impl InvokeContext, request: SetScheduledContentRatingThresholdRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_add_block_channels( &self, ctx: impl InvokeContext, request: AddBlockChannelsRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_remove_block_channels( &self, ctx: impl InvokeContext, request: RemoveBlockChannelsRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_add_block_applications( &self, ctx: impl InvokeContext, request: AddBlockApplicationsRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_remove_block_applications( &self, ctx: impl InvokeContext, request: RemoveBlockApplicationsRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_set_block_content_time_window( &self, ctx: impl InvokeContext, request: SetBlockContentTimeWindowRequest<'_>, ) -> Result<(), Error>

Source

async fn handle_remove_block_content_time_window( &self, ctx: impl InvokeContext, request: RemoveBlockContentTimeWindowRequest<'_>, ) -> Result<(), Error>

Provided Methods§

Source

fn lifecycle( &self, _ctx: impl HandlerContext, _op: LifecycleOp, ) -> Result<(), Error>

Source

fn run( &self, _ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>

Source

fn on_demand_ratings<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<RatingNameStructArrayBuilder<P>, RatingNameStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source

fn on_demand_rating_threshold<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source

fn scheduled_content_ratings<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<RatingNameStructArrayBuilder<P>, RatingNameStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source

fn scheduled_content_rating_threshold<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source

fn screen_daily_time( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source

fn remaining_screen_time( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source

fn block_unrated( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source

fn block_channel_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<BlockChannelStructArrayBuilder<P>, BlockChannelStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source

fn block_application_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<AppInfoStructArrayBuilder<P>, AppInfoStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source

fn block_content_time_window<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<TimeWindowStructArrayBuilder<P>, TimeWindowStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> ClusterAsyncHandler for &T

Source§

const CLUSTER: Cluster<'static> = T::CLUSTER

Source§

fn dataver(&self) -> u32

Source§

fn dataver_changed(&self)

Source§

fn lifecycle( &self, ctx: impl HandlerContext, op: LifecycleOp, ) -> Result<(), Error>

Source§

fn run( &self, ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>

Source§

fn enabled( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source§

fn on_demand_ratings<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<RatingNameStructArrayBuilder<P>, RatingNameStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn on_demand_rating_threshold<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn scheduled_content_ratings<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<RatingNameStructArrayBuilder<P>, RatingNameStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn scheduled_content_rating_threshold<P>( &self, ctx: impl ReadContext, builder: Utf8StrBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn screen_daily_time( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source§

fn remaining_screen_time( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u32, Error>>

Source§

fn block_unrated( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<bool, Error>>

Source§

fn block_channel_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<BlockChannelStructArrayBuilder<P>, BlockChannelStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn block_application_list<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<AppInfoStructArrayBuilder<P>, AppInfoStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn block_content_time_window<P>( &self, ctx: impl ReadContext, builder: ArrayAttributeRead<TimeWindowStructArrayBuilder<P>, TimeWindowStructBuilder<P>>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn handle_update_pin( &self, ctx: impl InvokeContext, request: UpdatePINRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_reset_pin<P>( &self, ctx: impl InvokeContext, response: ResetPINResponseBuilder<P>, ) -> impl Future<Output = Result<P, Error>>

Source§

fn handle_enable( &self, ctx: impl InvokeContext, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_disable( &self, ctx: impl InvokeContext, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_add_bonus_time( &self, ctx: impl InvokeContext, request: AddBonusTimeRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_set_screen_daily_time( &self, ctx: impl InvokeContext, request: SetScreenDailyTimeRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_block_unrated_content( &self, ctx: impl InvokeContext, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_unblock_unrated_content( &self, ctx: impl InvokeContext, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_set_on_demand_rating_threshold( &self, ctx: impl InvokeContext, request: SetOnDemandRatingThresholdRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_set_scheduled_content_rating_threshold( &self, ctx: impl InvokeContext, request: SetScheduledContentRatingThresholdRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_add_block_channels( &self, ctx: impl InvokeContext, request: AddBlockChannelsRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_remove_block_channels( &self, ctx: impl InvokeContext, request: RemoveBlockChannelsRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_add_block_applications( &self, ctx: impl InvokeContext, request: AddBlockApplicationsRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_remove_block_applications( &self, ctx: impl InvokeContext, request: RemoveBlockApplicationsRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_set_block_content_time_window( &self, ctx: impl InvokeContext, request: SetBlockContentTimeWindowRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Source§

fn handle_remove_block_content_time_window( &self, ctx: impl InvokeContext, request: RemoveBlockContentTimeWindowRequest<'_>, ) -> impl Future<Output = Result<(), Error>>

Implementors§