withSession(_:)
Synchronously begins a session, executes the given closure, and ends the session.
Declaration
func withSession<T>(_ body: @escaping () throws -> T) throws -> TParameters
- body:
A closure to be called in the context of the created session.