Skip to content

std::bytes

Status: experimental

Byte buffers, builders, and slice helpers.

API details and source

The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.

Item Canonical signature or declaration Description
Buffer type Buffer Growable byte buffer.
Builder type Builder Incremental string builder.
index_of fn index_of(haystack: Vec<u8>, needle: Vec<u8>) -> Option<i64> First occurrence of a byte needle.
replace fn replace(haystack: Vec<u8>, from: Vec<u8>, to: Vec<u8>) -> Vec<u8> Replaces every occurrence of a byte needle.
split fn split(haystack: Vec<u8>, sep: Vec<u8>) -> Vec<Vec<u8>> Splits on every separator occurrence.