Skip to main content

OtaSoftwareUpdateProviderClient

Trait OtaSoftwareUpdateProviderClient 

Source
pub trait OtaSoftwareUpdateProviderClient<'a>: ImClient<'a> {
    // Provided method
    fn ota_software_update_provider(
        self,
    ) -> OtaSoftwareUpdateProviderClientView<'a> { ... }
}
Expand description

Single-shot IM-client convenience trait for the OtaSoftwareUpdateProvider cluster. use this trait to call .ota_software_update_provider() on an crate::transport::exchange::Exchange; the returned OtaSoftwareUpdateProviderClientView exposes one method per command and per attribute. Scalar attributes get a by-value <attr>_read(endpoint); non-scalar ones (string/octet/struct/list, whose value borrows the response) get <attr>_read_with(endpoint, |v| …), which hands the borrowed value to the closure and returns its owned result. The cluster ID, command/attribute ID, request opcode, retransmit loop, response-chunk iteration, and status-only handling are all baked in. DefaultSuccess commands return Result<(), Error> and drain the response internally; response-bearing commands return Result<<RespStruct>Handle<'a>, Error> — the handle keeps the RX buffer alive so the caller can read the borrowed response via .response()? before .complete().await?ing the exchange.

The indirection through OtaSoftwareUpdateProviderClientView keeps each cluster’s API surface narrow: at the call site exchange.ota_software_update_provider(). shows only this cluster’s methods in IDE completion.

Provided Methods§

Source

fn ota_software_update_provider(self) -> OtaSoftwareUpdateProviderClientView<'a>

Enter this cluster’s client view. Consumes the exchange — call methods on the returned view to drive a single IM transaction (one command invoke or one attribute read/write).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§