pub struct ReadReqBuilder<P, const F: usize = 0> { /* private fields */ }Expand description
Streaming builder for a ReadRequestMessage. Type-state-tagged
so the compiler enforces in-order field writes; optional fields
are implicitly skipped by not calling their setter.
Field-state values (state after each named field has been written or implicitly skipped):
0: nothing written yet1: pastAttributeRequests2: pastEventRequests3: pastEventFilters4: pastFabricFiltered(mandatory; no implicit-skip path from state 0/1/2/3 to here)5: pastDataVersionFilters6: pastInteractionModelRevision(auto-injected at default valueIM_REVISIONbyend()if the optional setter wasn’t called)
Implementations§
Source§impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
Source§impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
Sourcepub fn attr_requests(
self,
) -> Result<AttrPathArrayBuilder<ReadReqBuilder<P, 1>>, Error>
pub fn attr_requests( self, ) -> Result<AttrPathArrayBuilder<ReadReqBuilder<P, 1>>, Error>
Open the optional AttributeRequests array. Each .push()
yields an AttrPathBuilder; close with .end() to advance
to the next message field.
Sourcepub fn attr_requests_from(
self,
paths: &[AttrPath],
) -> Result<ReadReqBuilder<P, 1>, Error>
pub fn attr_requests_from( self, paths: &[AttrPath], ) -> Result<ReadReqBuilder<P, 1>, Error>
Write AttributeRequests from a pre-built slice. Convenience
for callers that already have an &[AttrPath] on hand.
Source§impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
Sourcepub fn event_requests_from(
self,
paths: &[EventPath],
) -> Result<ReadReqBuilder<P, 2>, Error>
pub fn event_requests_from( self, paths: &[EventPath], ) -> Result<ReadReqBuilder<P, 2>, Error>
Write EventRequests from a pre-built slice, implicitly
skipping AttributeRequests.
Source§impl<P> ReadReqBuilder<P, 1>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 1>where
P: TLVBuilderParent,
Sourcepub fn event_requests_from(
self,
paths: &[EventPath],
) -> Result<ReadReqBuilder<P, 2>, Error>
pub fn event_requests_from( self, paths: &[EventPath], ) -> Result<ReadReqBuilder<P, 2>, Error>
Write EventRequests from a pre-built slice. A streaming
sub-builder for EventPath is on the to-do list for when an
MCU client actually subscribes to events directly.
Source§impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
pub fn event_filters_from( self, filters: &[EventFilter], ) -> Result<ReadReqBuilder<P, 3>, Error>
Source§impl<P> ReadReqBuilder<P, 1>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 1>where
P: TLVBuilderParent,
pub fn event_filters_from( self, filters: &[EventFilter], ) -> Result<ReadReqBuilder<P, 3>, Error>
Source§impl<P> ReadReqBuilder<P, 2>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 2>where
P: TLVBuilderParent,
Sourcepub fn event_filters_from(
self,
filters: &[EventFilter],
) -> Result<ReadReqBuilder<P, 3>, Error>
pub fn event_filters_from( self, filters: &[EventFilter], ) -> Result<ReadReqBuilder<P, 3>, Error>
Write EventFilters from a pre-built slice.
Source§impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P>where
P: TLVBuilderParent,
Sourcepub fn fabric_filtered(self, value: bool) -> Result<ReadReqBuilder<P, 4>, Error>
pub fn fabric_filtered(self, value: bool) -> Result<ReadReqBuilder<P, 4>, Error>
Write the mandatory FabricFiltered field, implicitly
skipping AttributeRequests, EventRequests, and
EventFilters.
Source§impl<P> ReadReqBuilder<P, 1>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 1>where
P: TLVBuilderParent,
pub fn fabric_filtered(self, value: bool) -> Result<ReadReqBuilder<P, 4>, Error>
Source§impl<P> ReadReqBuilder<P, 2>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 2>where
P: TLVBuilderParent,
pub fn fabric_filtered(self, value: bool) -> Result<ReadReqBuilder<P, 4>, Error>
Source§impl<P> ReadReqBuilder<P, 3>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 3>where
P: TLVBuilderParent,
Sourcepub fn fabric_filtered(self, value: bool) -> Result<ReadReqBuilder<P, 4>, Error>
pub fn fabric_filtered(self, value: bool) -> Result<ReadReqBuilder<P, 4>, Error>
Write the mandatory FabricFiltered field. true constrains
reads of fabric-scoped attributes to the accessing fabric;
false returns entries for every fabric the accessor has
access to.
Source§impl<P> ReadReqBuilder<P, 4>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 4>where
P: TLVBuilderParent,
Sourcepub fn dataver_filters_from(
self,
filters: &[DataVersionFilter],
) -> Result<ReadReqBuilder<P, 5>, Error>
pub fn dataver_filters_from( self, filters: &[DataVersionFilter], ) -> Result<ReadReqBuilder<P, 5>, Error>
Write DataVersionFilters from a pre-built slice. Used by
caching clients to avoid re-reading attributes that haven’t
changed since the last data version they observed.
Source§impl<P> ReadReqBuilder<P, 4>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 4>where
P: TLVBuilderParent,
Source§impl<P> ReadReqBuilder<P, 4>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 4>where
P: TLVBuilderParent,
Sourcepub fn interaction_model_revision(
self,
value: u8,
) -> Result<ReadReqBuilder<P, 6>, Error>
pub fn interaction_model_revision( self, value: u8, ) -> Result<ReadReqBuilder<P, 6>, Error>
Write InteractionModelRevision, implicitly skipping
DataVersionFilters. This is a typestate skip-shim mirroring
the pattern PR #447 established for SuppressResponse /
TimedRequest on InvReqBuilder: callers who don’t populate
the optional preceding field can advance straight to setting
(or auto-injecting) InteractionModelRevision without an
explicit no-op transition.
Source§impl<P> ReadReqBuilder<P, 5>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 5>where
P: TLVBuilderParent,
Sourcepub fn interaction_model_revision(
self,
value: u8,
) -> Result<ReadReqBuilder<P, 6>, Error>
pub fn interaction_model_revision( self, value: u8, ) -> Result<ReadReqBuilder<P, 6>, Error>
Write the mandatory-on-the-wire InteractionModelRevision
field (Matter Core: value is 13 since Matter
1.3, unchanged in 1.4 and 1.5). Optional at the API level —
omit and end() injects IM_REVISION automatically. Set
explicitly only when speaking a non-default revision is
required (e.g. interop testing against a peer pinned to an
older revision).
Sourcepub fn end(self) -> Result<P, Error>
pub fn end(self) -> Result<P, Error>
Close the message struct, auto-injecting
InteractionModelRevision at its default value
IM_REVISION. Returns the parent.
Source§impl<P> ReadReqBuilder<P, 6>where
P: TLVBuilderParent,
impl<P> ReadReqBuilder<P, 6>where
P: TLVBuilderParent,
Trait Implementations§
Source§impl<P> TLVBuilder<P> for ReadReqBuilder<P>where
P: TLVBuilderParent,
impl<P> TLVBuilder<P> for ReadReqBuilder<P>where
P: TLVBuilderParent,
Source§impl<P, const F: usize> TLVBuilderParent for ReadReqBuilder<P, F>where
P: TLVBuilderParent,
impl<P, const F: usize> TLVBuilderParent for ReadReqBuilder<P, F>where
P: TLVBuilderParent,
Source§type Write = <P as TLVBuilderParent>::Write
type Write = <P as TLVBuilderParent>::Write
Source§fn writer(&mut self) -> &mut <ReadReqBuilder<P, F> as TLVBuilderParent>::Write
fn writer(&mut self) -> &mut <ReadReqBuilder<P, F> as TLVBuilderParent>::Write
Auto Trait Implementations§
impl<P, const F: usize> Freeze for ReadReqBuilder<P, F>where
P: Freeze,
impl<P, const F: usize> RefUnwindSafe for ReadReqBuilder<P, F>where
P: RefUnwindSafe,
impl<P, const F: usize> Send for ReadReqBuilder<P, F>where
P: Send,
impl<P, const F: usize> Sync for ReadReqBuilder<P, F>where
P: Sync,
impl<P, const F: usize> Unpin for ReadReqBuilder<P, F>where
P: Unpin,
impl<P, const F: usize> UnsafeUnpin for ReadReqBuilder<P, F>where
P: UnsafeUnpin,
impl<P, const F: usize> UnwindSafe for ReadReqBuilder<P, F>where
P: UnwindSafe,
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