Contents

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 : ArchiveStreamProtocol

Parameters

  • 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.

See Also

Using Custom Streams