pub struct ToolEffect {
pub kind: ToolEffectKind,
pub target: String,
pub reversibility: EffectReversibility,
pub confirmation: EffectConfirmation,
pub dry_run: DryRunSupport,
}Expand description
Declarative hints about how a tool participates in the runtime.
Fields§
§kind: ToolEffectKindThe stable effect category.
target: StringOptional target, such as a path, host, channel, or resource name.
reversibility: EffectReversibilityWhether this effect can be undone after execution.
confirmation: EffectConfirmationConfirmation preference declared by the tool author.
dry_run: DryRunSupportDry-run support declared by the tool author.
Implementations§
Source§impl ToolEffect
impl ToolEffect
pub const fn new(kind: ToolEffectKind) -> Self
pub fn with_target(self, target: impl Into<String>) -> Self
pub const fn with_reversibility( self, reversibility: EffectReversibility, ) -> Self
pub const fn with_confirmation(self, confirmation: EffectConfirmation) -> Self
pub const fn with_dry_run(self, dry_run: DryRunSupport) -> Self
pub const fn is_mutating(&self) -> bool
pub fn label(&self) -> String
Trait Implementations§
Source§impl Clone for ToolEffect
impl Clone for ToolEffect
Source§fn clone(&self) -> ToolEffect
fn clone(&self) -> ToolEffect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolEffect
impl Debug for ToolEffect
Source§impl<'de> Deserialize<'de> for ToolEffect
impl<'de> Deserialize<'de> for ToolEffect
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
Source§impl PartialEq for ToolEffect
impl PartialEq for ToolEffect
Source§fn eq(&self, other: &ToolEffect) -> bool
fn eq(&self, other: &ToolEffect) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolEffect
impl Serialize for ToolEffect
impl Eq for ToolEffect
impl StructuralPartialEq for ToolEffect
Auto Trait Implementations§
impl Freeze for ToolEffect
impl RefUnwindSafe for ToolEffect
impl Send for ToolEffect
impl Sync for ToolEffect
impl Unpin for ToolEffect
impl UnsafeUnpin for ToolEffect
impl UnwindSafe for ToolEffect
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