[][src]Struct swim_c::cstring::CStringLease

pub struct CStringLease<L: Lease<Data = u8, Meta = BufHeader<M>>, M = ()> { /* fields omitted */ }

Methods

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> CStringLease<L, M>[src]

pub fn is_empty(&self) -> bool[src]

pub fn len(&self) -> usize[src]

pub fn cap(&self) -> usize[src]

pub fn meta(&self) -> &M[src]

pub fn meta_mut(&mut self) -> &mut M[src]

pub fn as_slice(&self) -> &[u8][src]

pub fn as_str(&self) -> Result<&str, Utf8Error>[src]

pub unsafe fn as_str_unchecked(&self) -> &str[src]

pub fn as_cstr(&self) -> &CStr[src]

pub fn as_ptr(&self) -> *const u8[src]

pub fn as_cptr(&self) -> *const cchar[src]

pub fn clear(&mut self)[src]

impl<'a, L: DynamicLease<'a, Data = u8, Meta = BufHeader<M>>, M> CStringLease<L, M>[src]

pub fn try_reserve(&mut self, ext: usize) -> Result<(), HoldError>[src]

pub fn reserve(&mut self, ext: usize)[src]

pub fn try_reserve_exact(&mut self, ext: usize) -> Result<(), HoldError>[src]

pub fn reserve_exact(&mut self, ext: usize)[src]

pub fn try_reserve_in_place(&mut self, ext: usize) -> Result<(), HoldError>[src]

pub fn try_reserve_in_place_exact(
    &mut self,
    ext: usize
) -> Result<(), HoldError>
[src]

pub fn try_push(&mut self, c: char) -> Result<(), HoldError>[src]

pub fn push(&mut self, c: char)[src]

pub fn try_push_str(&mut self, s: &str) -> Result<(), HoldError>[src]

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

Methods from Deref<Target = CStr>

pub fn as_ptr(&self) -> *const u8[src]

Converts this string to a pointer to a nul-terminated byte array.

pub fn as_cptr(&self) -> *const cchar[src]

Converts this string to a pointer to a nul-terminated C char array.

pub unsafe fn to_bytes(&self) -> &[u8][src]

Returns a byte slice containing the string and trailing nul byte.

pub unsafe fn to_str(&self) -> Result<&str, Utf8Error>[src]

Returns a string slice containing the string with no trailing nul byte.

pub unsafe fn to_str_unchecked(&self) -> &str[src]

Returns a string slice containing the string with no trailing nul byte, without verifying that the string contains valid UTF-8.

Trait Implementations

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> Deref for CStringLease<L, M>[src]

type Target = CStr

The resulting type after dereferencing.

impl<'a, L: DynamicLease<'a, Data = u8, Meta = BufHeader<M>>, M> Write for CStringLease<L, M>[src]

default fn write_fmt(&mut self, args: Arguments) -> Result<(), Error>
1.0.0
[src]

Glue for usage of the [write!] macro with implementors of this trait. Read more

Auto Trait Implementations

impl<L, M> Send for CStringLease<L, M> where
    L: Send

impl<L, M> Sync for CStringLease<L, M> where
    L: Sync

Blanket Implementations

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto 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, U> Into for T where
    U: From<T>, 
[src]

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

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

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

impl<'b, S, T> StowFrom for T where
    S: Stow<'b, T>, 
[src]

default fn stow_from(value: T, hold: &dyn Hold<'b>) -> Self[src]

impl<'b, S, T> StowInto for S where
    T: StowFrom<'b, S>, 
[src]

default fn stow_into(self, hold: &dyn Hold<'b>) -> T[src]