[][src]Struct compact::CString

pub struct CString { /* fields omitted */ }

A compact storage for a String. So far doesn't support direct mutable operations, Only conversion from and to String/&str

Methods

impl CompactString[src]

pub fn new() -> Self[src]

Create an empty CString

pub fn push_str(&mut self, string: &str)[src]

Appends a given string slice onto the end of this CString.

Trait Implementations

impl Compact for CompactString[src]

fn total_size_bytes(&self) -> usize[src]

Total size of the object (static part + dynamic part)

unsafe fn behind(ptr: *mut Self) -> *mut u8[src]

Get a pointer to behind the static part of self (commonly used place for the dynamic part)

unsafe fn compact_behind(source: *mut Self, dest: *mut Self)[src]

Like compact with new_dynamic_part set to dest.behind()

impl Default for CompactString[src]

impl From<String> for CompactString[src]

impl Clone for CompactString[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Deref for CompactString[src]

type Target = str

The resulting type after dereferencing.

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]