In keeping with Buf terminology, creates a potential zero-copy Buf which has a reference to the same region as the ByteWriter.
In keeping with Buf terminology, creates a potential zero-copy Buf which has a reference to the same region as the ByteWriter. That is, if any methods called on the builder are propagated to the returned Buf. By definition, the builder owns the region it is writing to so this is the natural way to coerce a builder to a Buf.
Write 8 bits of b
.
Write 8 bits of b
. The remaining 24 bits are ignored.
Write all the bytes from buf
into the running buffer.
Write all the bytes from buf
into the running buffer.
Write all the bytes from bs
into the running buffer.
Write all the bytes from bs
into the running buffer.
Write 64 bits from d
in big-endian order.
Write 64 bits from d
in big-endian order.
Write 64 bits from d
in little-endian order.
Write 64 bits from d
in little-endian order.
Write 32 bits from f
in big-endian order.
Write 32 bits from f
in big-endian order.
Write 32 bits from f
in little-endian order.
Write 32 bits from f
in little-endian order.
Write 32 bits from i
in big-endian order.
Write 32 bits from i
in big-endian order.
Write 32 bits from i
in little-endian order.
Write 32 bits from i
in little-endian order.
Write 64 bits from l
in big-endian order.
Write 64 bits from l
in big-endian order.
Write 64 bits from l
in little-endian order.
Write 64 bits from l
in little-endian order.
Write 24 bits from m
in big-endian order.
Write 24 bits from m
in big-endian order. The remaining
8 bits are ignored.
Write 24 bits from m
in little-endian order.
Write 24 bits from m
in little-endian order. The remaining
8 bits are ignored.
Write 16 bits from s
in big-endian order.
Write 16 bits from s
in big-endian order. The remaining
16 bits are ignored.
Write 16 bits from s
in little-endian order.
Write 16 bits from s
in little-endian order. The remaining
16 bits are ignored.
Write the byte representation of string
, encoded using the specified Charset
into the running buffer.
Write the byte representation of string
, encoded using the specified Charset
into the running buffer.
A
ByteWriter
that results in an ownedBuf