ActionPerformOutcome

public enum ActionPerformOutcome : CustomStringConvertible

The type that indicates the outcome of performing an action.

Actions use this result type to indicate whether or not the current action stack should be closed, indicating the end of a sequence of action usage for a given feature.

  • The action completed successfully, but does not indicate that the feature is now done. Usually this will be the outcome you use but when the action clearly indicates the user is no longer using the feature, e.g. closing a document for a Document Editing Feature, you use successClosingActionStack

    Declaration

    Swift

    case success
  • The action completed successfully, and indicates that the feature is now done. Usually this will not be the outcome you use for success. Unless the action clearly indicates the user is no longer using the feature, e.g. closing a document for a Document Editing Feature, you should use successWithoutClosingActionStack

    Declaration

    Swift

    case successWithFeatureTermination
  • The action failed to complete, but does not indicate that the feature is now done. Usually this will be the outcome you use but when the action clearly indicates the user is no longer using the feature, e.g. closing a document for a Document Editing Feature, you use successClosingActionStack

    Declaration

    Swift

    case failure(error: Error)
  • The action failed to complete, and indicates that the feature is now done. Usually this will not be the outcome you use for an error. Unless the action clearly indicates the user is no longer using the feature, e.g. closing a document for a Document Editing Feature, you should use successWithoutClosingActionStack

    Declaration

    Swift

    case failureWithFeatureTermination(error: Error)
  • Human-readable description of the cases

    Declaration

    Swift

    public var description: String { get }