pub(crate) enum KStringCowInner<'s, B> {
Borrowed(&'s str),
Owned(KStringBase<B>),
}Variants§
Borrowed(&'s str)
Owned(KStringBase<B>)
Implementations§
Source§impl<'s, B: HeapStr> KStringCowInner<'s, B>
impl<'s, B: HeapStr> KStringCowInner<'s, B>
fn as_ref(&self) -> KStringRef<'_>
fn into_owned(self) -> KStringBase<B>
fn as_str(&self) -> &str
fn into_boxed_str(self) -> Box<str>
Sourcefn into_cow_str(self) -> Cow<'s, str>
fn into_cow_str(self) -> Cow<'s, str>
Convert to a Cow str
Trait Implementations§
Source§impl<'s, B: Clone> Clone for KStringCowInner<'s, B>
impl<'s, B: Clone> Clone for KStringCowInner<'s, B>
Source§fn clone(&self) -> KStringCowInner<'s, B>
fn clone(&self) -> KStringCowInner<'s, B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'s, B> Freeze for KStringCowInner<'s, B>where
B: Freeze,
impl<'s, B> RefUnwindSafe for KStringCowInner<'s, B>where
B: RefUnwindSafe,
impl<'s, B> Send for KStringCowInner<'s, B>where
B: Send,
impl<'s, B> Sync for KStringCowInner<'s, B>where
B: Sync,
impl<'s, B> Unpin for KStringCowInner<'s, B>where
B: Unpin,
impl<'s, B> UnwindSafe for KStringCowInner<'s, B>where
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more