Skip to main content

Scenes

Struct Scenes 

Source
pub struct Scenes<'a, H: SceneHooks, G: GroupMembership, const N: usize, const EFS: usize, const F: usize = 5> { /* private fields */ }
Expand description

Scenes Management over a shared SceneTable.

Implementations§

Source§

impl<'a, H: SceneHooks, G: GroupMembership, const N: usize, const EFS: usize, const F: usize> Scenes<'a, H, G, N, EFS, F>

Source

pub const WITH_COPY_SCENE: Optional<'static>

Everything §1.4.9 leaves to the product: CopyScene.

Source

pub const fn new( table: &'a SceneTable<N, EFS, F>, groups: &'a G, hooks: &'a H, copy_scene: bool, ) -> Self

A cluster over table, checking group membership against groups.

§1.4.5: “Any endpoint that implements the Scenes Management server cluster SHALL also implement the Groups server cluster” — so the dependency is a constructor argument rather than an option, and an endpoint cannot be assembled without it.

Source

pub fn conforming( feature_map: u32, optional: &Optional<'_>, ) -> Result<Conforming<2, 8, 7, 0>>

The descriptor for an instance, derived from the specification’s tables.

Source

pub const fn table(&self) -> &'a SceneTable<N, EFS, F>

The table this cluster serves, for a device persisting it or wiring it into Groups.

Trait Implementations§

Source§

impl<H: SceneHooks, G: GroupMembership, const N: usize, const EFS: usize, const F: usize> Cluster for Scenes<'_, H, G, N, EFS, F>

So a tuple of clusters can dispatch to it by id.

Source§

const ID: ClusterId = ID

The cluster id this implementation serves.
Source§

impl<H: SceneHooks, G: GroupMembership, const N: usize, const EFS: usize, const F: usize> ClusterHandler for Scenes<'_, H, G, N, EFS, F>

Source§

fn on_lifecycle(&self, event: Lifecycle)

§1.4.6: the Scene Table is fabric-scoped, so a removed fabric’s scenes go with it — including the ones stored against its groups.

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 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 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§

impl<'a, H: Debug + SceneHooks, G: Debug + GroupMembership, const N: usize, const EFS: usize, const F: usize> Debug for Scenes<'a, H, G, N, EFS, F>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize = 5> !RefUnwindSafe for Scenes<'a, H, G, N, EFS, F>

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize = 5> !Send for Scenes<'a, H, G, N, EFS, F>

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize = 5> !Sync for Scenes<'a, H, G, N, EFS, F>

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize = 5> !UnwindSafe for Scenes<'a, H, G, N, EFS, F>

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize> Forget for Scenes<'a, H, G, N, EFS, F>

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize> Freeze for Scenes<'a, H, G, N, EFS, F>
where &'a SceneTable<N, EFS, F>: Freeze, &'a G: Freeze, &'a H: Freeze,

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize> Move for Scenes<'a, H, G, N, EFS, F>

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize> Unpin for Scenes<'a, H, G, N, EFS, F>
where &'a SceneTable<N, EFS, F>: Unpin, &'a G: Unpin, &'a H: Unpin,

§

impl<'a, H, G, const N: usize, const EFS: usize, const F: usize> UnsafeUnpin for Scenes<'a, H, G, N, EFS, F>

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> 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, 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.