Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub const unsafe fn from_utf8_unchecked_mut(v: &mut [u8]) -> &mut str
Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8; mutable version.
associated_function core Stable since 1.87.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str
Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8.
associated_function core Stable since 1.87.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error>
Converts a mutable slice of bytes to a mutable string slice.
associated_function core Stable since 1.87.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error>
Converts a slice of bytes to a string slice.
associated_function core Stable since 1.87.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn floor_char_boundary(&self, index: usize) -> usize
Finds the closest x not exceeding index where is_char_boundary(x) is true.
method core Stable since 1.91.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn find<P>(&self, pat: P) -> Option<usize>
Returns the byte index of the first character of this string slice that matches the pattern.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn escape_unicode(&self) -> EscapeUnicode<'_>
Returns an iterator that escapes each char in self with char::escape_unicode.
method core Stable since 1.34.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn escape_default(&self) -> EscapeDefault<'_>
Returns an iterator that escapes each char in self with char::escape_default.
method core Stable since 1.34.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn escape_debug(&self) -> EscapeDebug<'_>
Returns an iterator that escapes each char in self with char::escape_debug.
method core Stable since 1.34.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn valid_up_to(&self) -> usize
Returns the index in the given string up to which valid UTF-8 was verified.
method core Stable since 1.5.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn error_len(&self) -> Option<usize>
Provides more information about the failure:
method core Stable since 1.20.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Utf8Error
Errors which can occur when attempting to interpret a sequence of u8 as a string.
struct core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct ParseBoolError
An error returned when parsing a bool using from_str fails
struct core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn eq_ignore_ascii_case(&self, other: &str) -> bool
Checks that two strings are an ASCII case-insensitive match.
method core Stable since 1.23.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn ends_with<P>(&self, pat: P) -> bool
Returns true if the given pattern matches a suffix of this string slice.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn encode_utf16(&self) -> EncodeUtf16<'_>
Returns an iterator of u16 over the string encoded as native endian UTF-16 (without byte-order mark).
method core Stable since 1.8.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn from_utf8_unchecked_mut(v: &mut [u8]) -> &mut str
Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8; mutable version.
function core Stable since 1.20.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str
Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8.
function core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, super::Utf8Error>
Converts a mutable slice of bytes to a mutable string slice.
function core Stable since 1.20.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_utf8(v: &[u8]) -> Result<&str, super::Utf8Error>
Converts a slice of bytes to a string slice.
function core Stable since 1.0.0 Version 1.100.0-nightly
"`unsafe` Rust is all about flirting with UB but never giving in."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.