ServerSwitchResult

public enum ServerSwitchResult : Equatable

Represents a result of a server switch action

  • Server was switched and the workflow was successful

    Declaration

    Swift

    case success
  • The server is already the current one and no need to switch to it.

    Declaration

    Swift

    case noSwitchNeeded
  • Server switch was canceled by the end user.

    Declaration

    Swift

    case canceled
  • Runtime server configuration has been disabled.

    Declaration

    Swift

    case notAllowed
  • Error occured while switching server.

    Declaration

    Swift

    case failure(UsherErrorProtocol?)
  • Returns an UsherErrorProtocol if the switch failed with error.

    Note

    Do not use the availability of error for checking for success. A switch could fail with no error object associated with it.
    Declaration

    Swift

    public var error: UsherErrorProtocol? { get }
  • Compares two ServerSwitchResults.

    Declaration

    Swift

    public static func == (lhs: ServerSwitchResult, rhs: ServerSwitchResult) -> Bool
    Return Value

    Returns true if the two ServerSwitchResults are the same. In the case of failure, the associated error objects should also be the same.