Crate stringtape

Crate stringtape 

Source
Expand description

§StringTape

Memory-efficient string and bytes storage compatible with Apache Arrow.

use stringtape::{StringTapeI32, StringTapeError};

let mut tape = StringTapeI32::new();
tape.push("hello")?;
tape.push("world")?;

assert_eq!(tape.len(), 2);
assert_eq!(&tape[0], "hello");

// Iterate over strings
for s in &tape {
    println!("{}", s);
}

It also supports binary data via BytesTape:

use stringtape::{BytesTapeI32, StringTapeError};

let mut tape = BytesTapeI32::new();
tape.push(&[0xde, 0xad, 0xbe, 0xef])?;
tape.push(b"bytes")?;

assert_eq!(&tape[1], b"bytes" as &[u8]);

Structs§

BytesTape
Binary bytes view over RawTape.
BytesTapeView
Binary bytes view over RawTapeView.
RawParts
Named raw parts returned by as_raw_parts methods.
RawTapeView
A view into a continuous slice of a RawTape.
StringTape
UTF-8 string view over RawTape.
StringTapeIter
StringTapeView
UTF-8 string view over RawTapeView.

Enums§

StringTapeError
Errors that can occur when working with StringTape.

Traits§

OffsetType
Trait for offset types used in StringTape.

Type Aliases§

BytesTapeI32
BytesTapeI64
BytesTapeU32
BytesTapeU64
BytesTapeViewI32
BytesTapeViewI64
BytesTapeViewU32
BytesTapeViewU64
StringTapeI32
StringTapeI64
StringTapeU32
StringTapeU64
StringTapeViewI32
StringTapeViewI64
StringTapeViewU32
StringTapeViewU64