[−][src]Enum abin::StrSegment
A segment; segments can be joined to create strings. See StrBuilder
,
SegmentIterator
and SegmentsSlice
.
use abin::{NewStr, StrSegment, Str, StrBuilder}; let mut builder = NewStr::builder(); builder.push(StrSegment::Static("Hello, ")); builder.push(StrSegment::Static("World!")); let string : Str = builder.build(); assert_eq!("Hello, World!", string.as_str());
Variants
Slice(&'a str)
Static(&'static str)
Str(AnyStr<TBin>)
GivenString(String)
Char(char)
Trait Implementations
impl<'a, TBin: Clone + AnyBin> Clone for StrSegment<'a, TBin>
[src]
fn clone(&self) -> StrSegment<'a, TBin>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, TBin: Debug + AnyBin> Debug for StrSegment<'a, TBin>
[src]
impl<'a, TBin: AnyBin> From<&'static str> for StrSegment<'a, TBin>
[src]
impl<'a, TBin: AnyBin> From<AnyStr<TBin>> for StrSegment<'a, TBin>
[src]
impl<'a, TBin: AnyBin> From<String> for StrSegment<'a, TBin>
[src]
impl<'a, TBin: AnyBin> From<char> for StrSegment<'a, TBin>
[src]
impl<'a, TBin: AnyBin> Into<BinSegment<'a, TBin>> for StrSegment<'a, TBin>
[src]
fn into(self) -> BinSegment<'a, TBin>
[src]
impl<'a, TBin: AnyBin> Segment for StrSegment<'a, TBin>
[src]
Auto Trait Implementations
impl<'a, TBin> RefUnwindSafe for StrSegment<'a, TBin> where
TBin: RefUnwindSafe,
TBin: RefUnwindSafe,
impl<'a, TBin> Send for StrSegment<'a, TBin> where
TBin: Send,
TBin: Send,
impl<'a, TBin> Sync for StrSegment<'a, TBin> where
TBin: Sync,
TBin: Sync,
impl<'a, TBin> Unpin for StrSegment<'a, TBin> where
TBin: Unpin,
TBin: Unpin,
impl<'a, TBin> UnwindSafe for StrSegment<'a, TBin> where
TBin: UnwindSafe,
TBin: UnwindSafe,
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> 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>,