Skip to main content

FixedLabel

Struct FixedLabel 

Source
pub struct FixedLabel<'a> { /* private fields */ }
Expand description

Fixed Label 0x0040 (§9.8): the labels the manufacturer burned in.

Read-only over the wire — §9.8.5 gives LabelList access RV — so the list is &'static data alongside the rest of the device’s const model, and there is no path by which a commissioner could rewrite it.

Implementations§

Source§

impl<'a> FixedLabel<'a>

Source

pub const fn new(labels: &'a [Label<'a>]) -> Self

A cluster over the manufacturer’s labels.

Source

pub const fn labels(&self) -> &'a [Label<'a>]

The labels it reports.

Trait Implementations§

Source§

impl<'a> Clone for FixedLabel<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Cluster for FixedLabel<'_>

Source§

const ID: ClusterId = FIXED_LABEL_ID

The cluster id this implementation serves.
Source§

impl ClusterHandler for FixedLabel<'_>

Source§

fn read( &self, resolved: &Resolved<'_>, _ctx: &InteractionContext<'_>, w: &mut TlvWriter<'_>, tag: Tag, ) -> Result<(), Status>

Writes the value of resolved’s attribute under tag. Read more
Source§

fn data_version(&self, _resolved: &Resolved<'_>) -> Option<u32>

The cluster instance’s data version (§7.10.3), if it tracks one. Read more
Source§

fn write( &self, _resolved: &Resolved<'_>, _data: &[u8], _op: WriteOp, _ctx: &InteractionContext<'_>, ) -> Result<(), Status>

Writes data — the encoded TLV element, tag included — into the attribute. Read more
Source§

fn invoke( &self, _resolved: &ResolvedCommand<'_>, _fields: Option<&[u8]>, _ctx: &InteractionContext<'_>, _w: &mut TlvWriter<'_>, _tag: Tag, ) -> Result<Option<CommandId>, StatusIb>

Runs a command. Read more
Source§

fn on_lifecycle(&self, _event: Lifecycle)

Reacts to something that happened to the node (see Lifecycle). Read more
Source§

impl<'a> Copy for FixedLabel<'a>

Source§

impl<'a> Debug for FixedLabel<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for FixedLabel<'a>

§

impl<'a> Freeze for FixedLabel<'a>

§

impl<'a> Move for FixedLabel<'a>

§

impl<'a> RefUnwindSafe for FixedLabel<'a>

§

impl<'a> Send for FixedLabel<'a>

§

impl<'a> Sync for FixedLabel<'a>

§

impl<'a> Unpin for FixedLabel<'a>

§

impl<'a> UnsafeUnpin for FixedLabel<'a>

§

impl<'a> UnwindSafe for FixedLabel<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.