[−][src]Struct abin::NewSStr
Default implementation used to create SStr
. See StrFactory
for documentation.
use abin::{SStr, NewSStr, StrFactory}; let string : SStr = NewSStr::from_static("Hello, I'm a binary!"); assert_eq!("Hello, I'm a binary!", string.as_str());
Implementations
impl NewSStr
[src]
pub fn builder<'a>() -> impl StrBuilder<'a, T = SBin>
[src]
Constructs a builder that can be used to create SStr
.
Trait Implementations
impl BooToOwned<str, AnyStr<SBin>> for NewSStr
[src]
fn convert_to_owned(borrowed: &str) -> SStr
[src]
impl StrFactory for NewSStr
[src]
type TBinFactory = NewSBin
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 NewSStr
impl Send for NewSStr
impl Sync for NewSStr
impl Unpin for NewSStr
impl UnwindSafe for NewSStr
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>,