pub struct Cluster {
pub id: u32,
pub name: &'static str,
pub revision: u16,
pub attributes: &'static [Attribute],
pub commands: &'static [Command],
pub events: &'static [Event],
pub responses: &'static [(u32, &'static StructDef)],
}Expand description
A cluster: its attributes, commands and events.
Fields§
§id: u32Cluster id.
name: &'static strIDL name, UpperCamelCase.
revision: u16Cluster revision the IDL describes.
attributes: &'static [Attribute]Attributes, sorted by id, global attributes included.
commands: &'static [Command]Commands the server accepts, sorted by id.
events: &'static [Event]Events, sorted by id.
responses: &'static [(u32, &'static StructDef)]Response commands the server sends, by command id.
Implementations§
Source§impl Cluster
impl Cluster
Sourcepub fn attribute_by_name(&self, name: &str) -> Option<&'static Attribute>
pub fn attribute_by_name(&self, name: &str) -> Option<&'static Attribute>
The attribute named name (case and _ ignored).
Sourcepub fn command_by_name(&self, name: &str) -> Option<&'static Command>
pub fn command_by_name(&self, name: &str) -> Option<&'static Command>
The command named name (case and _ ignored).
Sourcepub fn event_by_name(&self, name: &str) -> Option<&'static Event>
pub fn event_by_name(&self, name: &str) -> Option<&'static Event>
The event named name (case and _ ignored).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cluster
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnsafeUnpin for Cluster
impl UnwindSafe for Cluster
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
§impl<T> Init<T> for T
impl<T> Init<T> for T
§impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
§fn into_fallible<E>(self) -> impl Init<T, E>
fn into_fallible<E>(self) -> impl Init<T, E>
Convert the infallible initializer to a fallible one.