[−][src]Struct abin::NewStr
Default implementation used to create Str
. See StrFactory
for documentation.
use abin::{Str, NewStr, StrFactory}; let string : Str = NewStr::from_static("Hello, I'm a binary!"); assert_eq!("Hello, I'm a binary!", string.as_str());
Implementations
impl NewStr
[src]
pub fn builder<'a>() -> impl StrBuilder<'a, T = Bin>
[src]
Constructs a builder that can be used to create Str
.
Trait Implementations
impl BooToOwned<str, AnyStr<Bin>> for NewStr
[src]
fn convert_to_owned(borrowed: &str) -> Str
[src]
impl StrFactory for NewStr
[src]
type TBinFactory = NewBin
The binary backend this string factory uses to produce strings (strings are just wrappers for utf-8-validated binaries). Read more
fn from_segments<'a>(
iter: impl SegmentIterator<StrSegment<'a, <Self::TBinFactory as BinFactory>::T>>
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
[src]
iter: impl SegmentIterator<StrSegment<'a, <Self::TBinFactory as BinFactory>::T>>
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
fn from_segment<'a>(
segment: impl Into<StrSegment<'a, <Self::TBinFactory as BinFactory>::T>>
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
[src]
segment: impl Into<StrSegment<'a, <Self::TBinFactory as BinFactory>::T>>
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
fn from_utf8_iter(
iter: impl IntoIterator<Item = u8>
) -> FromUtf8IterResult<<Self::TBinFactory as BinFactory>::T>
[src]
iter: impl IntoIterator<Item = u8>
) -> FromUtf8IterResult<<Self::TBinFactory as BinFactory>::T>
fn empty() -> AnyStr<<Self::TBinFactory as BinFactory>::T>
[src]
fn from_static(
string: &'static str
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
[src]
string: &'static str
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
fn from_given_string(
string: impl Into<String>
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
[src]
string: impl Into<String>
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
fn copy_from_str<'a>(
string: impl Into<&'a str>
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
[src]
string: impl Into<&'a str>
) -> AnyStr<<Self::TBinFactory as BinFactory>::T>
Auto Trait Implementations
impl RefUnwindSafe for NewStr
impl Send for NewStr
impl Sync for NewStr
impl Unpin for NewStr
impl UnwindSafe for NewStr
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, 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>,