Struct string_pool::String
source · pub struct String { /* private fields */ }
Implementations§
source§impl String
impl String
pub fn new() -> Self
pub fn from_utf8(vec: Vec<u8>) -> Result<Self, Utf8Error>
pub fn from_utf8_slice(s: &[u8]) -> Result<Self, Utf8Error>
pub fn from_utf8_lossy(v: &[u8]) -> Self
pub fn from_utf16(v: &[u16]) -> Result<String, FromUtf16Error>
pub fn from_utf16_lossy(v: &[u16]) -> String
pub unsafe fn from_utf8_unchecked(bytes: Vec<u8>) -> String
pub fn as_str(&self) -> &str
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn truncate(&self, new_len: usize) -> Self
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for String
impl Send for String
impl Sync for String
impl Unpin for String
impl UnwindSafe for String
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