Type Alias rustc_session::config::opt::S

source ·
pub type S = &'static str;

Trait Implementations§

1.0.0 · source§

impl Default for &str

source§

fn default() -> &str

Creates an empty str

1.0.0 · source§

impl !Error for &str

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl<'l> From<&'l Attribute> for &'l str

§

fn from(input: &'l Attribute) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Key> for &'l str

§

fn from(input: &'l Key) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Key> for &'l str

§

fn from(input: &'l Key) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Language> for &'l str

§

fn from(input: &'l Language) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Region> for &'l str

§

fn from(input: &'l Region) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Region> for &'l str

§

fn from(input: &'l Region) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Script> for &'l str

§

fn from(input: &'l Script) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Script> for &'l str

§

fn from(input: &'l Script) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Subtag> for &'l str

§

fn from(input: &'l Subtag) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Subtag> for &'l str

§

fn from(input: &'l Subtag) -> &'l str

Converts to this type from the input type.
§

impl<'l> From<&'l Variant> for &'l str

§

fn from(input: &'l Variant) -> &'l str

Converts to this type from the input type.
1.0.0 · source§

impl<'a, 'b> PartialEq<Cow<'a, str>> for &'b str

source§

fn eq(&self, other: &Cow<'a, str>) -> bool

This method tests for self and other values to be equal, and is used by ==.
source§

fn ne(&self, other: &Cow<'a, str>) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
1.29.0 · source§

impl<'a> PartialEq<OsString> for &'a str

source§

fn eq(&self, other: &OsString) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
1.0.0 · source§

impl<'a, 'b> PartialEq<String> for &'a str

source§

fn eq(&self, other: &String) -> bool

This method tests for self and other values to be equal, and is used by ==.
source§

fn ne(&self, other: &String) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> PartialEq<Value> for &'a str

source§

fn eq(&self, other: &Value) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, 'b> Pattern<'a> for &'b str

Non-allocating substring search.

Will handle the pattern "" as returning empty matches at each character boundary.

Examples

assert_eq!("Hello world".find("world"), Some(6));
source§

fn is_prefix_of(self, haystack: &'a str) -> bool

🔬This is a nightly-only experimental API. (pattern)

Checks whether the pattern matches at the front of the haystack.

source§

fn is_contained_in(self, haystack: &'a str) -> bool

🔬This is a nightly-only experimental API. (pattern)

Checks whether the pattern matches anywhere in the haystack

source§

fn strip_prefix_of(self, haystack: &'a str) -> Option<&'a str>

🔬This is a nightly-only experimental API. (pattern)

Removes the pattern from the front of haystack, if it matches.

source§

fn is_suffix_of(self, haystack: &'a str) -> bool

🔬This is a nightly-only experimental API. (pattern)

Checks whether the pattern matches at the back of the haystack.

source§

fn strip_suffix_of(self, haystack: &'a str) -> Option<&'a str>

🔬This is a nightly-only experimental API. (pattern)

Removes the pattern from the back of haystack, if it matches.

§

type Searcher = StrSearcher<'a, 'b>

🔬This is a nightly-only experimental API. (pattern)
Associated searcher for this pattern
source§

fn into_searcher(self, haystack: &'a str) -> StrSearcher<'a, 'b>

🔬This is a nightly-only experimental API. (pattern)
Constructs the associated searcher from self and the haystack to search in.
1.72.0 · source§

impl<'a> TryFrom<&'a OsStr> for &'a str

source§

fn try_from(value: &'a OsStr) -> Result<&'a str, Utf8Error>

Tries to convert an &OsStr to a &str.

use std::ffi::OsStr;

let os_str = OsStr::new("foo");
let as_str = <&str>::try_from(os_str).unwrap();
assert_eq!(as_str, "foo");
§

type Error = Utf8Error

The type returned in the event of a conversion error.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 16 bytes