Trait fricgan::VLQString [] [src]

pub trait VLQString {
    fn vlq_string_read<V: Unsigned>(&mut self, source: &[u8]) -> usize
    where
        V: ToPrimitive + FromPrimitive + Unsigned + VLQ
;
fn vlq_string_write<V>(&mut self, sink: &mut [u8]) -> usize
    where
        V: ToPrimitive + FromPrimitive + Unsigned + VLQ
; }

VLQString is the trait for defining VLQ-indexed strings in storage. Fricgan provides a generic VLQString implementation for String, allowing either u32 or u64 to be passed into it (depending on what is enabled in the features, or what is implemented externally).

It can theoretically be used for any container class.

Required Methods

Read a String value using a VLQ typed unsigned integer.

This can be used for arbitrary types, but it is designed to operate on String.

Writes the underlying value to the sink as a string prefixed with a VLQ typed unsigned integer preceding it.

This can be used for arbitrary types, but it is designed to operate on String.

Implementations on Foreign Types

impl VLQString for String
[src]

[src]

[src]

Implementors