Vapor Documentation Beta

Structure Validator​Results.​Case

public struct Case<T, E> where E: RawRepresentable & CaseIterable, E.RawValue == T, T: CustomStringConvertible

ValidatorResult of a validator thaat validates whether the data can be represented as a specific Enum case.

%3 ValidatorResults.Case ValidatorResults.Case ValidatorResult ValidatorResult ValidatorResults.Case->ValidatorResult

Member Of

ValidatorResults

Conforms To

ValidatorResult

Properties

enum​Type

let enumType: E.Type

The type of the enum to check.

raw​Value

let rawValue: T

The raw value that would be tested agains the enum type.

is​Failure

var isFailure: Bool

success​Description

var successDescription: String?

failure​Description

var failureDescription: String?