Error
Additional errors for delimited message handing.
enum Error
Additional errors for delimited message handing.
enum Error
import SwiftProtobuf
Support library for Swift code generated by protoc-gen-swift.
enum BinaryDelimited
Helper methods for reading/writing messages with a length prefix.
case unknownStreamError
If a read/write to the stream fails, but the stream’s streamError
is nil, this error will be throw instead since the stream didn’t provide anything more specific. A common cause for this can be failing to open the stream before trying to read/write to it.
case truncated
While reading/writing to the stream, less than the expected bytes was read/written.
static func merge<M>(into message: inout M, from stream: InputStream, extensions: (any ExtensionMap)? = nil, partial: Bool = false, options: BinaryDecodingOptions = BinaryDecodingOptions()) throws where M : Message
Updates the message by reading a single size-delimited message from the given stream. Delimited format allows a single file or stream to contain multiple messages, whereas normally parsing consumes the entire input. A delimited message is a varint encoding the message size followed by a message of exactly that size.
static func parse<M>(messageType: M.Type, from stream: InputStream, extensions: (any ExtensionMap)? = nil, partial: Bool = false, options: BinaryDecodingOptions = BinaryDecodingOptions()) throws -> M where M : Message
Reads a single size-delimited message from the given stream. Delimited format allows a single file or stream to contain multiple messages, whereas normally parsing consumes the entire input. A delimited message is a varint encoding the message size followed by a message of exactly exactly that size.
static func serialize(message: any Message, to stream: OutputStream, partial: Bool = false) throws
Serialize a single size-delimited message to the given stream. Delimited format allows a single file or stream to contain multiple messages, whereas normally writing multiple non-delimited messages to the same stream would cause them to be merged. A delimited message is a varint encoding the message size followed by a message of exactly that size.
protocol Equatable
A type that can be compared for value equality.
protocol Error : Sendable
A type representing an error value that can be thrown.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
var localizedDescription: String { get }
Retrieve the localized description for this error.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.