Instance Method
render(path:context:)
The public interface to
LeafRendererfunc render(path: String, context: [String : LeafData]) -> EventLoopFuture<ByteBuffer>
Parameters
pathName of the template to be used
contextAny unique context data for the template to use
Return Value
Serialized result of using the template, or a failed future
Discussion
Interpretation of path is dependent on the implementation of LeafSource but is assumed to be relative to LeafConfiguration.rootDirectory.
Where LeafSource is a file sytem based source, some assumptions should be made; .leaf extension should be inferred if none is provided- "path/to/template" corresponds to "/.../ViewDirectory/path/to/template.leaf", while an explicit extension - "file.svg" would correspond to "/.../ViewDirectory/file.svg"