pub struct LevelControlClientView<'a> { /* private fields */ }Expand description
Per-exchange view onto the LevelControl cluster’s client operations. Returned by LevelControlClient::level_control. Each method consumes the view (and therefore the underlying crate::transport::exchange::Exchange) — one exchange is one IM transaction.
Implementations§
Source§impl<'a> LevelControlClientView<'a>
impl<'a> LevelControlClientView<'a>
pub async fn move_to_level<F>(
self,
endpoint: u16,
request: F,
) -> Result<(), Error>where
F: FnMut(MoveToLevelRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn move<F>(self, endpoint: u16, request: F) -> Result<(), Error>where
F: FnMut(MoveRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn step<F>(self, endpoint: u16, request: F) -> Result<(), Error>where
F: FnMut(StepRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn stop<F>(self, endpoint: u16, request: F) -> Result<(), Error>where
F: FnMut(StopRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn move_to_level_with_on_off<F>(
self,
endpoint: u16,
request: F,
) -> Result<(), Error>where
F: FnMut(MoveToLevelWithOnOffRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn move_with_on_off<F>(
self,
endpoint: u16,
request: F,
) -> Result<(), Error>where
F: FnMut(MoveWithOnOffRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn step_with_on_off<F>(
self,
endpoint: u16,
request: F,
) -> Result<(), Error>where
F: FnMut(StepWithOnOffRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn stop_with_on_off<F>(
self,
endpoint: u16,
request: F,
) -> Result<(), Error>where
F: FnMut(StopWithOnOffRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn move_to_closest_frequency<F>(
self,
endpoint: u16,
request: F,
) -> Result<(), Error>where
F: FnMut(MoveToClosestFrequencyRequestBuilder<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>>) -> Result<CmdDataBuilder<CmdDataArrayBuilder<InvReqBuilder<InvokeSender<'a>, 3>>, 2>, Error>,
pub async fn current_level_read( self, endpoint: u16, ) -> Result<Maybe<u8, AsNullable>, Error>
pub async fn remaining_time_read(self, endpoint: u16) -> Result<u16, Error>
pub async fn min_level_read(self, endpoint: u16) -> Result<u8, Error>
pub async fn max_level_read(self, endpoint: u16) -> Result<u8, Error>
pub async fn current_frequency_read(self, endpoint: u16) -> Result<u16, Error>
pub async fn min_frequency_read(self, endpoint: u16) -> Result<u16, Error>
pub async fn max_frequency_read(self, endpoint: u16) -> Result<u16, Error>
pub async fn options_read(self, endpoint: u16) -> Result<OptionsBitmap, Error>
pub async fn on_off_transition_time_read( self, endpoint: u16, ) -> Result<u16, Error>
pub async fn on_level_read( self, endpoint: u16, ) -> Result<Maybe<u8, AsNullable>, Error>
pub async fn on_transition_time_read( self, endpoint: u16, ) -> Result<Maybe<u16, AsNullable>, Error>
pub async fn off_transition_time_read( self, endpoint: u16, ) -> Result<Maybe<u16, AsNullable>, Error>
pub async fn default_move_rate_read( self, endpoint: u16, ) -> Result<Maybe<u8, AsNullable>, Error>
pub async fn start_up_current_level_read( self, endpoint: u16, ) -> Result<Maybe<u8, AsNullable>, Error>
Sourcepub async fn generated_command_list_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R,
) -> Result<R, Error>
pub async fn generated_command_list_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
Sourcepub async fn accepted_command_list_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R,
) -> Result<R, Error>
pub async fn accepted_command_list_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
Sourcepub async fn attribute_list_read_with<R>(
self,
endpoint: u16,
f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R,
) -> Result<R, Error>
pub async fn attribute_list_read_with<R>( self, endpoint: u16, f: impl FnOnce(Result<TLVContainer<'_, u32, ArrayContainer>, Error>) -> R, ) -> Result<R, Error>
Read a non-scalar attribute (string, octet string, struct or list) whose value borrows the response buffer. Decodes the value and passes Result<Value, Error> to f while the borrow is live, returning the owned R that f produces (copy out what you need, e.g. |v| v.map(|s| s.to_string())). A non-served optional attribute surfaces as Err to f.
pub async fn feature_map_read(self, endpoint: u16) -> Result<u32, Error>
pub async fn cluster_revision_read(self, endpoint: u16) -> Result<u16, Error>
pub async fn options_write( self, endpoint: u16, value: OptionsBitmap, ) -> Result<(), Error>
pub async fn on_off_transition_time_write( self, endpoint: u16, value: u16, ) -> Result<(), Error>
pub async fn on_level_write( self, endpoint: u16, value: Maybe<u8, AsNullable>, ) -> Result<(), Error>
pub async fn on_transition_time_write( self, endpoint: u16, value: Maybe<u16, AsNullable>, ) -> Result<(), Error>
pub async fn off_transition_time_write( self, endpoint: u16, value: Maybe<u16, AsNullable>, ) -> Result<(), Error>
pub async fn default_move_rate_write( self, endpoint: u16, value: Maybe<u8, AsNullable>, ) -> Result<(), Error>
pub async fn start_up_current_level_write( self, endpoint: u16, value: Maybe<u8, AsNullable>, ) -> Result<(), Error>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for LevelControlClientView<'a>
impl<'a> !Send for LevelControlClientView<'a>
impl<'a> !Sync for LevelControlClientView<'a>
impl<'a> !UnwindSafe for LevelControlClientView<'a>
impl<'a> Freeze for LevelControlClientView<'a>
impl<'a> Unpin for LevelControlClientView<'a>
impl<'a> UnsafeUnpin for LevelControlClientView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more