From 1de9738e6e048babb8db089f8aeb1a9afbfbf580 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Tue, 4 Feb 2025 20:58:14 +0100 Subject: [PATCH] Defined the "render(_: on: )" function for the TemplateServicing protocol in the library target. --- .../Sources/Public/Protocols/TemplateServicing.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Sources/Public/Protocols/TemplateServicing.swift b/Library/Sources/Public/Protocols/TemplateServicing.swift index ec6ba22..24682e6 100644 --- a/Library/Sources/Public/Protocols/TemplateServicing.swift +++ b/Library/Sources/Public/Protocols/TemplateServicing.swift @@ -2,6 +2,15 @@ public protocol TemplateServicing { // MARK: Functions - func render(_ object: Any, on template: String) async throws (RenderServiceError) -> String + func render(_ object: Any, on template: String) async throws (TemplateServiceError) -> String } + +// MARK: - Errors + +public enum TemplateServiceError: Error { + case contentNotRendered + case resourcePathNotFound + case serviceNotInitialized + case templateNotFound +}