pub struct DriverCommandMetadata {
pub category: CommandCategory,
pub risk: Option<CommandAccessLevel>,
pub workflow: bool,
pub ui: bool,
pub deprecated: bool,
pub replaced_by: Option<String>,
pub requires_connection: bool,
}Expand description
Optional command metadata. Missing fields deserialize to workflow/UI-enabled defaults.
Fields§
§category: CommandCategory§risk: Option<CommandAccessLevel>Explicit risk. When omitted, derived from permissions and command id.
workflow: bool§ui: bool§deprecated: bool§replaced_by: Option<String>§requires_connection: boolWhen false, the host may execute this command without a live Connection.
Implementations§
Source§impl DriverCommandMetadata
impl DriverCommandMetadata
pub fn new(category: CommandCategory, risk: CommandAccessLevel) -> Self
pub fn hide_from_workflow(self) -> Self
pub fn unbound(self) -> Self
Trait Implementations§
Source§impl Clone for DriverCommandMetadata
impl Clone for DriverCommandMetadata
Source§impl Debug for DriverCommandMetadata
impl Debug for DriverCommandMetadata
Source§impl Default for DriverCommandMetadata
impl Default for DriverCommandMetadata
Source§impl<'de> Deserialize<'de> for DriverCommandMetadata
impl<'de> Deserialize<'de> for DriverCommandMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DriverCommandMetadata
Source§impl PartialEq for DriverCommandMetadata
impl PartialEq for DriverCommandMetadata
Source§impl Serialize for DriverCommandMetadata
impl Serialize for DriverCommandMetadata
impl StructuralPartialEq for DriverCommandMetadata
Auto Trait Implementations§
impl Freeze for DriverCommandMetadata
impl RefUnwindSafe for DriverCommandMetadata
impl Send for DriverCommandMetadata
impl Sync for DriverCommandMetadata
impl Unpin for DriverCommandMetadata
impl UnsafeUnpin for DriverCommandMetadata
impl UnwindSafe for DriverCommandMetadata
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