pub struct ChangesetOperation {
pub id: String,
pub label: String,
pub description: Option<String>,
pub scopes: Vec<ChangesetOperationScope>,
pub confirmation: Option<StringOrMarkdown>,
pub icon: Option<String>,
pub group: Option<String>,
pub status: ChangesetOperationStatus,
pub error: Option<ErrorInfo>,
}Expand description
A server-declared invokable verb the client can run against a
changeset, a file, or a range — "stage", "revert", "create-pr",
and so on.
The term “operation” is used deliberately to avoid colliding with the protocol-level Actions that mutate state.
Fields§
§id: StringStable identifier, unique within this changeset.
label: StringHuman-readable button/menu label.
description: Option<String>Optional longer description shown on hover or in tooltips.
scopes: Vec<ChangesetOperationScope>Where this operation can be invoked.
confirmation: Option<StringOrMarkdown>Optional confirmation prompt to show before invoking. When present, the client MUST display this message to the user (typically in a confirmation dialog) and only invoke the operation after the user accepts. The presence of this field also signals that the operation is destructive — clients SHOULD style the affirmative button accordingly (e.g. with a warning colour).
icon: Option<String>Optional generic icon hint, e.g. "check", "trash".
group: Option<String>Optional group identifier, used to group related operations together.
status: ChangesetOperationStatusCurrent execution status. The server sets {@link ChangesetOperationStatus.Running | Running} while an invocation is in flight, {@link ChangesetOperationStatus.Error | Error} when the most recent invocation failed, and {@link ChangesetOperationStatus.Idle | Idle} otherwise.
Clients SHOULD reflect this state in the UI — e.g. disabling the
control or showing a spinner while Running, and surfacing
{@link error} while Error.
error: Option<ErrorInfo>Cause of failure. Present iff
status === ChangesetOperationStatus.Error; otherwise omitted.
Trait Implementations§
Source§impl Clone for ChangesetOperation
impl Clone for ChangesetOperation
Source§fn clone(&self) -> ChangesetOperation
fn clone(&self) -> ChangesetOperation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChangesetOperation
impl Debug for ChangesetOperation
Source§impl<'de> Deserialize<'de> for ChangesetOperation
impl<'de> Deserialize<'de> for ChangesetOperation
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>,
Source§impl PartialEq for ChangesetOperation
impl PartialEq for ChangesetOperation
Source§fn eq(&self, other: &ChangesetOperation) -> bool
fn eq(&self, other: &ChangesetOperation) -> bool
self and other values to be equal, and is used by ==.