Struct kiwi_schema::ByteBufferMut [] [src]

pub struct ByteBufferMut { /* fields omitted */ }

A Kiwi byte buffer meant for writing.

Example usage:

let mut bb = kiwi_schema::ByteBufferMut::new();
bb.write_string("🍕");
bb.write_var_float(123.456);
assert_eq!(bb.data(), [240, 159, 141, 149, 0, 133, 242, 210, 237]);

Methods

impl ByteBufferMut
[src]

[src]

Creates an empty ByteBufferMut ready for writing.

[src]

Consumes this buffer and returns the underlying backing store. Use this to get the data out when you're done writing to the buffer.

[src]

Returns the number of bytes written so far.

[src]

Write a boolean value to the end of the buffer.

[src]

Write a byte to the end of the buffer.

[src]

Write a variable-length signed 32-bit integer to the end of the buffer.

[src]

Write a variable-length unsigned 32-bit integer to the end of the buffer.

[src]

Write a variable-length 32-bit floating-point number to the end of the buffer.

[src]

Write a UTF-8 string to the end of the buffer.