[−][src]Struct swim_c::cstring::CStringLease
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]
&mut self,
ext: usize
) -> Result<(), HoldError>
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]
impl<'a, L: DynamicLease<'a, Data = u8, Meta = BufHeader<M>>, M> Write for CStringLease<L, M>
[src]
Auto Trait Implementations
impl<L, M> Send for CStringLease<L, M> where
L: Send,
L: Send,
impl<L, M> Sync for CStringLease<L, M> where
L: Sync,
L: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<'b, S, T> StowFrom for T where
S: Stow<'b, T>,
[src]
S: Stow<'b, T>,
default fn try_stow_from(
src: S,
hold: &dyn Hold<'b>
) -> Result<T, (S, HoldError)>
[src]
src: S,
hold: &dyn Hold<'b>
) -> Result<T, (S, HoldError)>
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]
T: StowFrom<'b, S>,