BorrowedBytesCodec class abstract interface

Optional interface for codecs that can provide a zero-copy (borrowed) view over decoded frame bytes.

This is intended for extremely high-throughput use cases where the consumer processes frames synchronously and does not retain them.

Drivers that support borrowed views expose them via FrameBorrowedView and document the lifetime constraints.

Implemented types
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
hasPending bool
True if the codec has internally buffered bytes/state for an incomplete frame.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
tryDecode(RingBuffer rb) Uint8List?
Returns a decoded frame if complete, or null if incomplete.
inherited
tryDecodeBorrowed(RingBuffer rb) FrameBorrowedView?
Returns a decoded frame as a potentially-borrowed view, or null if the frame is incomplete.

Operators

operator ==(Object other) bool
The equality operator.
inherited