pub struct String<'a> { /* private fields */ }
Expand description
Wrapper for C string
Implementations§
Source§impl<'a> String<'a>
impl<'a> String<'a>
Sourcepub const fn try_new_c(string: &'a [u8]) -> Option<Self>
pub const fn try_new_c(string: &'a [u8]) -> Option<Self>
Creates new instance from C string (null terminated)
Returns None if input has no NULL character at the end
Sourcepub const fn new_c(string: &'a [u8]) -> Self
pub const fn new_c(string: &'a [u8]) -> Self
Creates new instance from C string (null terminated)
Panics if input has no NULL character at the end
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for String<'a>
impl<'a> RefUnwindSafe for String<'a>
impl<'a> Send for String<'a>
impl<'a> Sync for String<'a>
impl<'a> Unpin for String<'a>
impl<'a> UnwindSafe for String<'a>
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