Module bytes
SourceDescription
Bytes — contiguous byte sequence.
Bytes is a newtype over (Vec Byte) with its own dispatch identity; every method lives directly on :impl Bytes.
Seq-hierarchy impls (Foldable, Mappable, Filterable, Chainable, Zippable) and Concat arrive alongside the wider Seq wiring.
Data Types
Types
Trait Implementations
impl Bytes
.from-base64 ( Str → (Result Bytes Str) )
.from-base64 ( Str → (Result Bytes Str) )
(Bytes .from-base64) — decode a RFC 4648 standard Base64 string into Bytes. Qualified dispatch: "aGVsbG8=" (Bytes .from-base64).
.from-be-bytes ( Bytes → (Int ..) )
.from-be-bytes ( Bytes → (Int ..) )
Decode a big-endian integer from the bytes. Length MUST be 1, 2, 4, or 8.
.from-hex ( Str → (Result Bytes Str) )
.from-hex ( Str → (Result Bytes Str) )
(Bytes .from-hex) — decode a lowercase-or-uppercase hex string into Bytes. Returns Err with a message on odd length or non-hex characters. Qualified dispatch: "cafe" (Bytes .from-hex).
.from-le-bytes ( Bytes → (Int ..) )
.from-le-bytes ( Bytes → (Int ..) )
Decode a little-endian integer from the bytes. Length MUST be 1, 2, 4, or 8.
.from-str ( Str → Bytes )
.from-str ( Str → Bytes )
(Bytes .from-str) — Str → Bytes. Always succeeds because every Str is valid UTF-8, and valid UTF-8 is a valid byte sequence. Qualified dispatch: "abc" (Bytes .from-str).
.get ( (Int ..) Bytes → (Option (Int 0..)) )
.get ( (Int ..) Bytes → (Option (Int 0..)) )
Byte at index (0-based) as (Option AnyUInt); None if out of bounds.