[−][src]Struct pstr::IStr
Immutable Interning String
Implementations
impl IStr
[src]
pub fn new(s: impl AsRef<str>) -> Self
[src]
pub fn from_string(s: String) -> Self
[src]
Create a IStr
from String
pub fn from_boxed(s: Box<str>) -> Self
[src]
Create a IStr
from Box<str>
pub fn from_arc(s: Arc<str>) -> Self
[src]
Create a IStr
from Arc<str>
pub fn from_rc(s: Rc<str>) -> Self
[src]
Create a IStr
from Rc<str>
pub fn from_mow(s: MowStr) -> Self
[src]
Create a IStr
from MowStr
pub fn from_to_arc<S: AsRef<str>>(
s: S,
to_arc: impl FnOnce(S) -> Arc<str>
) -> Self
[src]
s: S,
to_arc: impl FnOnce(S) -> Arc<str>
) -> Self
Create a IStr
from custom fn
impl IStr
[src]
pub fn as_str(&self) -> &str
[src]
Extracts a string slice containing the entire IStr
pub fn into_boxed_str(&self) -> Box<str>
[src]
Clone a boxed string slice containing the entire IStr
pub fn into_mut(&self) -> MowStr
[src]
Convert to MowStr
Trait Implementations
impl AsRef<[u8]> for IStr
[src]
impl AsRef<OsStr> for IStr
[src]
impl AsRef<Path> for IStr
[src]
impl AsRef<str> for IStr
[src]
impl Borrow<str> for IStr
[src]
impl Clone for IStr
[src]
impl Debug for IStr
[src]
impl Deref for IStr
[src]
impl Eq for IStr
[src]
impl Extend<IStr> for MowStr
[src]
fn extend<T: IntoIterator<Item = IStr>>(&mut self, iter: T)
[src]
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl<'_> From<&'_ String> for IStr
[src]
impl<'_> From<&'_ mut str> for IStr
[src]
impl<'_> From<&'_ str> for IStr
[src]
impl<'a> From<&'a IStr> for Cow<'a, str>
[src]
impl From<Arc<str>> for IStr
[src]
impl From<Box<str>> for IStr
[src]
impl<'a> From<Cow<'a, str>> for IStr
[src]
impl From<IStr> for Box<str>
[src]
impl From<IStr> for Vec<u8>
[src]
impl From<IStr> for MowStr
[src]
impl From<IStr> for Arc<str>
[src]
impl From<IStr> for Rc<str>
[src]
impl<'a> From<IStr> for Cow<'a, str>
[src]
impl From<IStr> for Box<dyn Error>
[src]
impl From<IStr> for Box<dyn Error + Send + Sync>
[src]
impl From<IStr> for OsString
[src]
impl From<IStr> for PathBuf
[src]
impl From<IStr> for String
[src]
impl From<MowStr> for IStr
[src]
impl From<Rc<str>> for IStr
[src]
impl From<String> for IStr
[src]
impl From<char> for IStr
[src]
impl<'a> FromIterator<&'a char> for IStr
[src]
fn from_iter<T: IntoIterator<Item = &'a char>>(iter: T) -> Self
[src]
impl<'a> FromIterator<&'a str> for IStr
[src]
fn from_iter<T: IntoIterator<Item = &'a str>>(iter: T) -> Self
[src]
impl FromIterator<Box<str>> for IStr
[src]
fn from_iter<T: IntoIterator<Item = Box<str>>>(iter: T) -> Self
[src]
impl<'a> FromIterator<Cow<'a, str>> for IStr
[src]
fn from_iter<T: IntoIterator<Item = Cow<'a, str>>>(iter: T) -> Self
[src]
impl FromIterator<String> for IStr
[src]
fn from_iter<T: IntoIterator<Item = String>>(iter: T) -> Self
[src]
impl FromIterator<char> for IStr
[src]
fn from_iter<T: IntoIterator<Item = char>>(iter: T) -> Self
[src]
impl FromStr for IStr
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for IStr
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<I: SliceIndex<str>> Index<I> for IStr
[src]
type Output = <I as SliceIndex<str>>::Output
The returned type after indexing.
fn index(&self, index: I) -> &Self::Output
[src]
impl Interning for IStr
[src]
impl Muterning for IStr
[src]
impl Ord for IStr
[src]
fn cmp(&self, other: &IStr) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'_> PartialEq<&'_ OsStr> for IStr
[src]
impl<'_> PartialEq<&'_ str> for IStr
[src]
impl PartialEq<IStr> for IStr
[src]
impl PartialEq<OsStr> for IStr
[src]
impl PartialEq<OsString> for IStr
[src]
impl PartialEq<String> for IStr
[src]
impl PartialEq<str> for IStr
[src]
impl PartialOrd<IStr> for IStr
[src]
fn partial_cmp(&self, other: &IStr) -> Option<Ordering>
[src]
fn lt(&self, other: &IStr) -> bool
[src]
fn le(&self, other: &IStr) -> bool
[src]
fn gt(&self, other: &IStr) -> bool
[src]
fn ge(&self, other: &IStr) -> bool
[src]
impl StructuralEq for IStr
[src]
impl StructuralPartialEq for IStr
[src]
impl ToSocketAddrs for IStr
[src]
type Iter = <str as ToSocketAddrs>::Iter
Returned iterator over socket addresses which this type may correspond to. Read more
fn to_socket_addrs(&self) -> Result<Self::Iter>
[src]
impl ToString for IStr
[src]
Auto Trait Implementations
impl RefUnwindSafe for IStr
impl Send for IStr
impl Sync for IStr
impl Unpin for IStr
impl UnwindSafe for IStr
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,