#[non_exhaustive]pub struct AttributeReportItem {
pub path: AttributePath,
pub op: ReportOp,
pub value: Value,
pub data_version: Option<u32>,
}Expand description
One AttributeReportIB carrying AttributeData, retaining the list-merge
metadata that the ReportData::attributes convenience view flattens away.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: AttributePathConcrete (endpoint, cluster, attribute).
op: ReportOpWhether this IB replaces the attribute value or appends a list element.
value: ValueThe data value (whole attribute for Replace, one element for Append).
data_version: Option<u32>DataVersion (AttributeData context tag 0), if present.
Implementations§
Source§impl AttributeReportItem
impl AttributeReportItem
Sourcepub fn new(
path: AttributePath,
op: ReportOp,
value: Value,
data_version: Option<u32>,
) -> Self
pub fn new( path: AttributePath, op: ReportOp, value: Value, data_version: Option<u32>, ) -> Self
Construct an AttributeReportItem from its decoded parts.
Provided because the struct is #[non_exhaustive]: callers in other
crates cannot use a struct literal, so this constructor is the stable
way to build one. Any future spec-driven field will gain a default
here without breaking existing callers.
Trait Implementations§
Source§impl Clone for AttributeReportItem
impl Clone for AttributeReportItem
Source§fn clone(&self) -> AttributeReportItem
fn clone(&self) -> AttributeReportItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttributeReportItem
impl Debug for AttributeReportItem
Source§impl PartialEq for AttributeReportItem
impl PartialEq for AttributeReportItem
impl StructuralPartialEq for AttributeReportItem
Auto Trait Implementations§
impl Freeze for AttributeReportItem
impl RefUnwindSafe for AttributeReportItem
impl Send for AttributeReportItem
impl Sync for AttributeReportItem
impl Unpin for AttributeReportItem
impl UnsafeUnpin for AttributeReportItem
impl UnwindSafe for AttributeReportItem
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
Mutably borrows from an owned value. Read more