OperationStatus 枚举


定义可以从基于范围的操作返回的值,这些操作支持处理多个不连续缓冲区中包含的输入。Defines the values that can be returned from span-based operations that support processing of input contained in multiple discontiguous buffers.

public enum class OperationStatus
public enum OperationStatus
type OperationStatus = 
Public Enum OperationStatus


DestinationTooSmall 1

对输入进行部分处理,直至达到适合目标缓冲区的最大量。The input is partially processed, up to what could fit into the destination buffer. 调用方可以扩大目标缓冲区,适当划分该缓冲区,然后重试。The caller can enlarge the destination buffer, slice the buffers appropriately, and retry.

Done 0

已完成对整个输入缓冲区的处理操作。The entire input buffer has been processed and the operation is complete.

InvalidData 3

输入包含无法处理的无效字节。The input contained invalid bytes which could not be processed. 如果已对输入进行部分处理,则目标包含部分结果。If the input is partially processed, the destination contains the partial result. 这将确保任何附加到输入的其他数据都不会使无效序列变得有效。This guarantees that no additional data appended to the input will make the invalid sequence valid.

NeedMoreData 2

已对输入进行部分处理,直到可使用的输入的最后一个有效区块。The input is partially processed, up to the last valid chunk of the input that could be consumed. 调用方可以使用更多数据拼结剩余未处理输入,适当划分缓冲区,然后重试。The caller can stitch the remaining unprocessed input with more data, slice the buffers appropriately, and retry.