[−][src]Enum mail_headers::data::InnerAscii
InnerAscii is string data container which can contain either a
owned SoftAsciiString or a SoftAsciiStr reference into a shared
string buffer.
Variants
Owned(SoftAsciiString)Methods
impl InnerAscii[src]
pub fn into_shared(self) -> Self[src]
converts this container into on which uses underlying shared data
if the data is already shared nothing is done.
If not the owned data is converted into the underlying string buffer
and OwningRef is used to enable the shared reference
Note that the underlying buffer is no an SoftAsciiString but a
String (from which we happend to know that it fulfills the "is
us-ascii" soft constraint). This allows us to have an InnerAscii
share data with a possible non us-ascii string buffer as long as
the part accessable through the SoftAsciiStr is ascii. Or at last
should be ascii as it's a soft constraint.
impl InnerAscii[src]
pub fn new<S: Into<SoftAsciiString>>(data: S) -> Self[src]
impl InnerAscii[src]
Methods from Deref<Target = SoftAsciiStr>
pub fn revalidate_soft_constraint(
&self
) -> Result<&SoftAsciiStr, FromSourceError<&str>>[src]
&self
) -> Result<&SoftAsciiStr, FromSourceError<&str>>
reruns checks if the "is us-ascii" soft constraint is still valid
pub fn as_str(&self) -> &str[src]
pub fn lines(&self) -> SoftAsciiLines[src]
pub fn split_whitespace(&self) -> SoftAsciiSplitWhitespace[src]
pub fn char_indices(&self) -> SoftAsciiCharIndices[src]
pub fn chars(&self) -> SoftAsciiChars[src]
pub fn split_at(&self, mid: usize) -> (&SoftAsciiStr, &SoftAsciiStr)[src]
pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &SoftAsciiStr[src]
deprecated in std
pub unsafe fn get_unchecked<I>(&self, index: I) -> &SoftAsciiStr where
I: TempSliceIndexHelper, [src]
I: TempSliceIndexHelper,
Proxy of std::str::get_unchecked.
Currently limited to the various range types:
Range<usize>RangeInclusive<usize>RangeFrom<usize>RangeTo<usize>RangeToInclusive<usize>RangeFull
Once all methods on SliceIndex are stable this
can be implemented using SliceIndex<SoftAsciiStr>
bounds.
pub fn parse<F>(&self) -> Result<F, <F as FromStr>::Err> where
F: FromStr, [src]
F: FromStr,
pub fn to_lowercase(&self) -> SoftAsciiString[src]
pub fn to_uppercase(&self) -> SoftAsciiString[src]
pub fn repeat(&self, n: usize) -> SoftAsciiString[src]
pub fn trim_right(&self) -> &SoftAsciiStr[src]
deprecated in std
pub fn trim_left(&self) -> &SoftAsciiStr[src]
deprecated in std
pub fn trim_end(&self) -> &SoftAsciiStr[src]
pub fn trim_start(&self) -> &SoftAsciiStr[src]
pub fn trim(&self) -> &SoftAsciiStr[src]
pub fn len(&self) -> usize[src]
pub fn is_empty(&self) -> bool[src]
pub fn is_char_boundary(&self, index: usize) -> bool[src]
pub fn as_ptr(&self) -> *const u8[src]
pub fn encode_utf16(&self) -> EncodeUtf16[src]
pub fn is_ascii(&self) -> bool[src]
pub fn as_bytes(&self) -> &[u8][src]
Trait Implementations
impl AsRef<str> for InnerAscii[src]
impl Clone for InnerAscii[src]
fn clone(&self) -> InnerAscii[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for InnerAscii[src]
impl Deref for InnerAscii[src]
type Target = SoftAsciiStr
The resulting type after dereferencing.
fn deref(&self) -> &SoftAsciiStr[src]
impl Eq for InnerAscii[src]
impl From<SoftAsciiString> for InnerAscii[src]
fn from(data: SoftAsciiString) -> Self[src]
impl Hash for InnerAscii[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 Into<SoftAsciiString> for InnerAscii[src]
fn into(self) -> SoftAsciiString[src]
impl PartialEq<InnerAscii> for InnerAscii[src]
impl StructuralEq for InnerAscii[src]
Auto Trait Implementations
impl RefUnwindSafe for InnerAscii
impl Send for InnerAscii
impl Sync for InnerAscii
impl Unpin for InnerAscii
impl UnwindSafe for InnerAscii
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,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Erased for 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.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
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.
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>,