MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / from_bytes

Method from_bytes

rust/stringzilla.rs:368–374  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

366 /// Constructs a Byteset from a slice of bytes.
367 #[inline]
368 pub fn from_bytes(bytes: &[u8]) -> Self {
369 let mut set = Self::new();
370 for &b in bytes {
371 set.add_u8(b);
372 }
373 set
374 }
375}
376
377impl Default for Byteset {

Callers 2

Calls 1

add_u8Method · 0.80

Tested by

no test coverage detected