Skip to main content

Module str

Module str 

Source
Expand description

String types, views, and storage invariants.

str β—‰

Extends: std::{str, string}


StructsΒ§

CStr
𝐓 πŸƒ core Representation of a borrowed C string (See CString).
CStringalloc
𝐓 alloc An owned, C-compatible, nul-terminated string with no nul bytes in the middle.
FromUtf8Erroralloc
𝐓 🚩 alloc A possible error value when converting a String from a UTF-8 byte vector.
OsStrstd
𝐓 πŸƒ πŸ–₯️ std Borrowed reference to an OS string (See OsString).
OsStringstd
𝐓 πŸ–₯️ std A type for owned, mutable native strings, interconvertible with Rust strings.
Str
🧢 πŸ› οΈ A string slice namespace.
StrBuf
🧢 A borrowed UTF-8 string buffer over caller-provided bytes.
Stringalloc
𝐓 alloc A UTF-8–encoded, growable string.
StringNonul
🧢 A null-terminated UTF-8 string with up to u8::MAX bytes capacity.
StringSmallAllocalloc
🧢 A UTF-8 string with inline storage and heap spillover.
StringU8
🧢 A UTF-8 string with fixed capacity that stores length explicitly.

TraitsΒ§

FromStr
𝐓 πŸƒ core Parse a value from a string.
StrExt
🧢 Extension trait providing additional methods for &str.
StringExtalloc
🧢 Extension trait providing additional methods for String.
ToStringalloc
𝐓 πŸ’± alloc A trait for converting a value to a String.