STRUCT
public struct TemplateResultParser: TemplateResultParserProtocol
Based on the url, tries to decipher the resulting template.
public let parser: TemplateDecoder
public let reader: (URL) throws -> Data
public init(parser: TemplateDecoder? = nil, reader: ((URL) throws -> Data)? = nil)
public func template(fromURL url: URL, withType type: TemplateType?) -> TemplateResult
Based on the url, tries to decipher the resulting template or error.
- Parameter url: Source file for the template.
- Parameter type: Optional template type, otherwise both types will be attempted.
Name | Description |
---|---|
url | Source file for the template. |
type | Optional template type, otherwise both types will be attempted. |