#[repr(C)]pub(super) union KStringInner<B> {
tag: TagVariant,
singleton: SingletonVariant,
owned: ManuallyDrop<OwnedVariant<B>>,
inline: InlineVariant,
}Fields§
§tag: TagVariant§singleton: SingletonVariant§owned: ManuallyDrop<OwnedVariant<B>>§inline: InlineVariantImplementations§
Source§impl<B> KStringInner<B>
impl<B> KStringInner<B>
Sourcepub const fn from_static(other: &'static str) -> Self
pub const fn from_static(other: &'static str) -> Self
Create a reference to a 'static data.
pub fn try_inline(other: &str) -> Option<Self>
const fn tag(&self) -> Tag
Source§impl<B: HeapStr> KStringInner<B>
impl<B: HeapStr> KStringInner<B>
pub(super) fn from_boxed(other: BoxedStr) -> Self
pub(super) fn from_string(other: String) -> Self
pub(super) fn from_ref(other: &str) -> Self
pub(super) fn as_ref(&self) -> KStringRef<'_>
pub(super) fn as_str(&self) -> &str
pub(super) fn into_boxed_str(self) -> BoxedStr
Sourcepub(super) fn into_cow_str(self) -> Cow<'static, str>
pub(super) fn into_cow_str(self) -> Cow<'static, str>
Convert to a Cow str
Trait Implementations§
Source§impl<B: Clone> Clone for KStringInner<B>
impl<B: Clone> Clone for KStringInner<B>
Auto Trait Implementations§
impl<B> Freeze for KStringInner<B>where
B: Freeze,
impl<B> RefUnwindSafe for KStringInner<B>where
B: RefUnwindSafe,
impl<B> Send for KStringInner<B>where
B: Send,
impl<B> Sync for KStringInner<B>where
B: Sync,
impl<B> Unpin for KStringInner<B>where
B: Unpin,
impl<B> UnwindSafe for KStringInner<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