Updateable

public protocol Updateable

A protocol for calculations that can be updated with incremental data buffers.

  • Status of the calculation.

    Declaration

    Swift

    var status: Status { get }
  • Low-level update routine. Updates the calculation with the contents of a data buffer.

    Declaration

    Swift

    @discardableResult
    func update(buffer: UnsafeRawPointer, byteCount: size_t) -> `Self`?

    Parameters

    buffer

    pointer to the data buffer

    byteCount

    length of the buffer in bytes

    Return Value

    self if no error for optional chaining, null otherwise

  • update(data:) Extension method

    Updates the current calculation with data contained in an NSData object.

    Declaration

    Swift

    public func update(data: Data) -> Self?
  • update(byteArray:) Extension method

    Updates the current calculation with data contained in a Swift array.

    Declaration

    Swift

    public func update(byteArray: [UInt8]) -> Self?
  • update(string:) Extension method

    Updates the current calculation with data contained in a Swift string. The corresponding data will be generated using UTF8 encoding.

    Declaration

    Swift

    public func update(string: String) -> Self?
  • update(_:) Extension method

    Updates the current calculation with data contained in an NSData object.

    Declaration

    Swift

    public func update(_ data: Data) -> Self?
  • update(_:) Extension method

    Updates the current calculation with data contained in a Swift array.

    Declaration

    Swift

    public func update(_ byteArray: [UInt8]) -> Self?
  • update(_:) Extension method

    Updates the current calculation with data contained in a Swift string. The corresponding data will be generated using UTF8 encoding.

    Declaration

    Swift

    public func update(_ string: String) -> Self?