Contents

withStream(wrapping:_:)

Calls the given closure with an archive byte stream instance mapped to an object that conforms to the archive byte stream protocol.

Declaration

static func withStream<C, E>(wrapping instance: C, _ body: (ArchiveByteStream) throws -> E) throws -> E where C : AnyObject, C : ArchiveByteStreamProtocol

Parameters

  • instance:

    The object that the new archive stream wraps.

  • body:

    A closure with the archive byte stream passed as a parameter.

Return Value

The result of the closure.

See Also

Streaming with Custom Streams