pub struct CommandDescriptor {
pub id: CommandId,
pub access: Access,
pub response: Option<CommandId>,
}Expand description
One command of a cluster (§7.11).
Fields§
§id: CommandIdThe command id.
access: AccessIts access — which for a command means its invoke privilege.
response: Option<CommandId>The id of the command this one is answered with, if it has a response.
§7.13.4: “For each client request command in this list that mandates a response from the server, the response command SHALL be indicated in the GeneratedCommandList” — so this is what lets that list be synthesised rather than written twice.
Implementations§
Source§impl CommandDescriptor
impl CommandDescriptor
Sourcepub const fn new(id: CommandId) -> Self
pub const fn new(id: CommandId) -> Self
A request command invocable at Operate — §7.6’s default for a request command.
Sourcepub const fn with_response(self, response: CommandId) -> Self
pub const fn with_response(self, response: CommandId) -> Self
The same command, answered by response.
Sourcepub const fn with_access(self, access: Access) -> Self
pub const fn with_access(self, access: Access) -> Self
The same command with a different access.
Trait Implementations§
Source§impl Clone for CommandDescriptor
impl Clone for CommandDescriptor
impl Copy for CommandDescriptor
Source§impl Debug for CommandDescriptor
impl Debug for CommandDescriptor
impl Eq for CommandDescriptor
Source§impl PartialEq for CommandDescriptor
impl PartialEq for CommandDescriptor
impl StructuralPartialEq for CommandDescriptor
Auto Trait Implementations§
impl Forget for CommandDescriptor
impl Freeze for CommandDescriptor
impl Move for CommandDescriptor
impl RefUnwindSafe for CommandDescriptor
impl Send for CommandDescriptor
impl Sync for CommandDescriptor
impl Unpin for CommandDescriptor
impl UnsafeUnpin for CommandDescriptor
impl UnwindSafe for CommandDescriptor
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