pub union ArchivedStringRepr {
    /* private fields */
}Expand description
An archived string representation that can inline short strings.
Implementations
sourceimpl ArchivedStringRepr
 
impl ArchivedStringRepr
sourcepub unsafe fn out_of_line_offset(&self) -> isize
 
pub unsafe fn out_of_line_offset(&self) -> isize
sourcepub fn as_mut_ptr(&mut self) -> *mut u8
 
pub fn as_mut_ptr(&mut self) -> *mut u8
Returns a mutable pointer to the bytes of the string.
sourcepub fn bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
 
pub fn bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns a slice of the bytes of the string.
sourcepub fn bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
 
pub fn bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns a mutable slice of the bytes of the string.
sourcepub fn as_mut_str(&mut self) -> &mut str
 
pub fn as_mut_str(&mut self) -> &mut str
Returns a mutable reference to the string as a str.
sourcepub unsafe fn emplace_inline(value: &str, out: *mut Self)
 
pub unsafe fn emplace_inline(value: &str, out: *mut Self)
Emplaces a new inline representation for the given str.
Safety
- The length of strmust be less than or equal toINLINE_CAPACITY.
- outmust point to a valid location to write the inline representation.
sourcepub unsafe fn emplace_out_of_line(
    value: &str, 
    pos: usize, 
    target: usize, 
    out: *mut Self
)
 
pub unsafe fn emplace_out_of_line(
    value: &str, 
    pos: usize, 
    target: usize, 
    out: *mut Self
)
Rmplaces a new out-of-line representation for the given str.
Safety
- The length of strmust be greater thanINLINE_CAPACITY.
- posmust be the location of the representation within the archive.
- targetmust be the location of the serialized bytes of the string.
- outmust point to a valid location to write the out-of-line representation.
Auto Trait Implementations
impl RefUnwindSafe for ArchivedStringRepr
impl Send for ArchivedStringRepr
impl Sync for ArchivedStringRepr
impl Unpin for ArchivedStringRepr
impl UnwindSafe for ArchivedStringRepr
Blanket Implementations
sourceimpl<T> ArchivePointee for T
 
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
 
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
 
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more