pub struct Action {
pub name: &'static str,
pub exposure: Exposure,
pub mutates: bool,
pub view_only: bool,
pub streams: bool,
pub commands: Option<&'static [CommandExposure]>,
}Expand description
One callable action.
Fields§
§name: &'static strThe name exactly as it travels in DaemonRequest.action.
exposure: ExposureWho may call it.
mutates: boolWhether it changes stored state or the machine.
view_only: boolWhether a read-only attachment may call it.
streams: boolWhether its answer opens a live stream of frames. A transport that carries one request and one answer (the browser bridge) cannot serve such an action and says so instead of answering half of it.
commands: Option<&'static [CommandExposure]>Per-subcommand authority, present only when it differs from the action-level summary.
Implementations§
Source§impl Action
impl Action
Sourcepub const fn new(
name: &'static str,
exposure: Exposure,
mutates: bool,
view_only: bool,
) -> Self
pub const fn new( name: &'static str, exposure: Exposure, mutates: bool, view_only: bool, ) -> Self
Builds a catalog entry. Const so the table below stays a plain list.
Sourcepub const fn streaming(
name: &'static str,
exposure: Exposure,
mutates: bool,
view_only: bool,
) -> Self
pub const fn streaming( name: &'static str, exposure: Exposure, mutates: bool, view_only: bool, ) -> Self
Builds an entry whose answer opens a live stream of frames.
Sourcepub const fn with_commands(self, commands: &'static [CommandExposure]) -> Self
pub const fn with_commands(self, commands: &'static [CommandExposure]) -> Self
Adds per-subcommand authority to an entry.
Trait Implementations§
impl Copy for Action
impl Eq for Action
impl StructuralPartialEq for Action
Auto Trait Implementations§
impl Forget for Action
impl Freeze for Action
impl Move for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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