pub struct AttrPath {
pub tag_compression: Option<bool>,
pub node: Option<u64>,
pub endpoint: Option<u16>,
pub cluster: Option<u32>,
pub attr: Option<u32>,
pub list_index: Option<Maybe<u16, AsNullable>>,
}Expand description
A path to an attribute in the Interaction Model.
Corresponds to the AttrPathIB TLV structure in the Interaction Model.
Fields§
§tag_compression: Option<bool>EnableTagCompression per Matter Core spec. When set
to true, the spec defines a “tag compression scheme” whereby
omitted fields in this AttrPath should be inherited from the
previous AttrPath in the same list (rather than treated as
wildcards).
rs-matter parses this bit but does not act on it. Omitted fields are always treated as wildcards regardless of value.
This matches the de-facto behaviour of every other Matter implementation in the wild:
- chip’s
AttributePathIB::Parser::ParsePathreads the bit and ignores its semantics, treating omitted = wildcard. - matter.js explicitly leaves it unimplemented with a TODO comment “or likely remove it”.
- per https://github.com/project-chip/connectedhomeip/issues/29359, neither chip-tool nor Google’s controllers handle tag-compressed reports either, and the spec feature is widely expected to be removed rather than implemented.
If/when that landscape changes, real inheritance semantics
would slot into PathExpanderIterator in the im::expand module.
node: Option<u64>§endpoint: Option<u16>§cluster: Option<u32>§attr: Option<u32>§list_index: Option<Maybe<u16, AsNullable>>Implementations§
Source§impl AttrPath
impl AttrPath
Sourcepub const fn from_gp(path: &GenericPath) -> AttrPath
pub const fn from_gp(path: &GenericPath) -> AttrPath
Create a new AttrPath from the provided GenericPath,
filling all fields which are not provided with their default values.
Sourcepub const fn to_gp(&self) -> GenericPath
pub const fn to_gp(&self) -> GenericPath
Convert this AttrPath to a GenericPath.
Sourcepub const fn is_wildcard(&self) -> bool
pub const fn is_wildcard(&self) -> bool
Return true, if the path is wildcard
Trait Implementations§
impl Eq for AttrPath
Source§impl<'__from_tlv> FromTLV<'__from_tlv> for AttrPath
impl<'__from_tlv> FromTLV<'__from_tlv> for AttrPath
Source§fn from_tlv(element: &TLVElement<'__from_tlv>) -> Result<AttrPath, Error>
fn from_tlv(element: &TLVElement<'__from_tlv>) -> Result<AttrPath, Error>
Source§fn init_from_tlv(element: TLVElement<'__from_tlv>) -> impl Init<AttrPath, Error>
fn init_from_tlv(element: TLVElement<'__from_tlv>) -> impl Init<AttrPath, Error>
Source§fn nullable_from_tlv(element: &TLVElement<'a>) -> Result<Self, Error>
fn nullable_from_tlv(element: &TLVElement<'a>) -> Result<Self, Error>
Source§fn init_nullable_from_tlv(element: TLVElement<'a>) -> impl Init<Self, Error>
fn init_nullable_from_tlv(element: TLVElement<'a>) -> impl Init<Self, Error>
impl StructuralPartialEq for AttrPath
Source§impl ToTLV for AttrPath
impl ToTLV for AttrPath
Source§fn to_tlv<W>(&self, tag: &TLVTag, tw: W) -> Result<(), Error>where
W: TLVWrite,
fn to_tlv<W>(&self, tag: &TLVTag, tw: W) -> Result<(), Error>where
W: TLVWrite,
Source§fn tlv_iter(&self, tag: TLVTag) -> impl Iterator<Item = Result<TLV<'_>, Error>>
fn tlv_iter(&self, tag: TLVTag) -> impl Iterator<Item = Result<TLV<'_>, Error>>
TLV instances by potentially borrowing
data from the type.Source§impl<'__from_tlv> TryFrom<&TLVElement<'__from_tlv>> for AttrPath
impl<'__from_tlv> TryFrom<&TLVElement<'__from_tlv>> for AttrPath
Auto Trait Implementations§
impl Freeze for AttrPath
impl RefUnwindSafe for AttrPath
impl Send for AttrPath
impl Sync for AttrPath
impl Unpin for AttrPath
impl UnsafeUnpin for AttrPath
impl UnwindSafe for AttrPath
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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