CommandRequest

public protocol CommandRequest

Types that implement this protocol describe a command request and its associated response type.

See also

Commands
  • The type that will be returned in the case of successful command execution.

    Declaration

    Swift

    associatedtype Response
  • Creates the request payload.

    Declaration

    Swift

    var request: V2ProtocolCommandRequestIDInjectable { get }
  • Parses the response payload and, if successful, creates a response of type Response.

    Declaration

    Swift

    func parseResponse(outerProto: Any) -> Result<Response, Error>
  • parseOuterResponse(data:) Default implementation

    Parses the outer response payload and, if status == .ok, creates a protobuf response type.

    Default Implementation

    Declaration

    Swift

    func parseOuterResponse(data: Data) -> Result<V2ProtocolCommandResponseInjectable, Error>
  • ignoreResponseErrorChecks() Default implementation

    Used by JacquardManager to check if the outer proto error should be ignored while parsing command response.

    Default Implementation

    Declaration

    Swift

    func ignoreResponseErrorChecks() -> Bool