pub struct TxBlock {
pub name: String,
pub kind: CommandBlockKind,
pub rollback_policy: RollbackPolicy,
pub steps: Vec<TxStep>,
pub fail_fast: bool,
}Expand description
Transaction-like command block.
Fields§
§name: StringLogical name used in logs/recording.
kind: CommandBlockKindBlock type (show skips rollback, config requires rollback policy).
rollback_policy: RollbackPolicyRollback behavior when any step fails.
steps: Vec<TxStep>Commands executed in order.
fail_fast: boolStop at first failure.
Implementations§
Source§impl TxBlock
impl TxBlock
Sourcepub fn validate(&self) -> Result<(), ConnectError>
pub fn validate(&self) -> Result<(), ConnectError>
Validate cross-field invariants before execution.
Key rule: show blocks must not define rollback; config blocks must.
pub fn plan_rollback( &self, executed_step_indices: &[usize], ) -> Result<Vec<PlannedRollback>, ConnectError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TxBlock
impl<'de> Deserialize<'de> for TxBlock
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 JsonSchema for TxBlock
impl JsonSchema for TxBlock
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§fn always_inline_schema() -> bool
fn always_inline_schema() -> bool
👎Deprecated: Use
inline_schema() insteadOnly included for backward-compatibility - use
inline_schema() instead“. Read moreimpl Eq for TxBlock
impl StructuralPartialEq for TxBlock
Auto Trait Implementations§
impl Freeze for TxBlock
impl RefUnwindSafe for TxBlock
impl Send for TxBlock
impl Sync for TxBlock
impl Unpin for TxBlock
impl UnsafeUnpin for TxBlock
impl UnwindSafe for TxBlock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.