CustomStringConvertible

protocol CustomStringConvertible
  • Easily create Failable versions of types conforming to CustomStringConvertible. This includes most, if not all, core Swift types.

    This paramater defaults to its own type, so if the validation type can be infered, you don’t need to pass the paramater in.

    var story: Failable<String, Length1028> = try "Once upon a time...".failable()
    

    Declaration

    Swift

    public func failable<Validations>(_ validations: Validations.Type = Validations.self)throws -> Failable<Self, Validations>

    Parameters

    validations

    The validation type to use when mutating the stored value.