Struct Str

pub struct Str { /* private fields */ }

A UTF-8-encoded fixed string

NOTE: To support dynamic values (i.e. String), enable the string feature

Implementations

impl Str

fn as_str(&self) -> &str

Get the raw string of the Str

Trait Implementations

impl AsRef<OsStr> for Str

fn as_ref(&self) -> &OsStr

impl AsRef<Path> for Str

fn as_ref(&self) -> &Path

impl AsRef<[u8]> for Str

fn as_ref(&self) -> &[u8]

impl AsRef<str> for Str

fn as_ref(&self) -> &str

impl Borrow<str> for Str

fn borrow(&self) -> &str

impl Clone for Str

fn clone(&self) -> Self

impl Debug for Str

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for Str

fn default() -> Self

impl Deref for Str

type Target = str;
fn deref(&self) -> &str

impl Display for Str

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for Str

impl From<&&'static str> for Str

fn from(name: &&'static str) -> Self

impl From<&'static str> for Str

fn from(name: &'static str) -> Self

impl From<&Str> for Str

fn from(id: &Str) -> Self

impl From<Id> for Str

fn from(name: Id) -> Self

impl Hash for Str

fn hash<__H: Hasher>(&self, state: &mut __H)

impl Ord for Str

fn cmp(&self, other: &Self) -> Ordering

impl PartialEq for Str

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

impl PartialEq<&OsStr> for Str

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

impl PartialEq<&str> for Str

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

impl PartialEq<Id> for Str

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

impl PartialEq<OsStr> for Str

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

impl PartialEq<String> for Str

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

impl PartialEq<str> for Str

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

impl PartialOrd for Str

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

impl StructuralPartialEq for Str

Auto Trait Implementations

impl Freeze for Str

impl RefUnwindSafe for Str

impl Send for Str

impl Sync for Str

impl Unpin for Str

impl UnsafeUnpin for Str

impl UnwindSafe for Str

Blanket Implementations

impl<I> IntoResettable<Id> for Str where I: Into<Id>,

fn into_resettable(self) -> Resettable<Id>

impl<I> IntoResettable<OsStr> for Str where I: Into<OsStr>,

fn into_resettable(self) -> Resettable<OsStr>

impl<I> IntoResettable<Str> for Str where I: Into<Str>,

fn into_resettable(self) -> Resettable<Str>

impl<I> IntoResettable<String> for Str where I: Into<String>,

fn into_resettable(self) -> Resettable<String>

impl<P, T> Receiver for Str where P: Deref<Target = T> + ?Sized, T: ?Sized,

type Target = T;

impl<T> Any for Str where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Str where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Str where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Str where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Str

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Str where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T> ToString for Str where T: Display + ?Sized,

fn to_string(&self) -> String

impl<T, U> Into<U> for Str where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Str where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Str where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>