withStream(wrapping:_:)
Calls the given closure with an archive stream instance mapped to an object that conforms to the archive stream protocol.
Declaration
static func withStream<C, E>(wrapping instance: C, _ body: (ArchiveStream) throws -> E) throws -> E where C : AnyObject, C : ArchiveStreamProtocolParameters
- instance:
The object that the new archive stream wraps.
- body:
A closure with the archive stream passed as a parameter.
Return Value
The result of the closure.