#[repr(C)]pub struct String {
pub ptr: *const u8,
pub len: usize,
}Expand description
A borrowed byte string (pointer + length).
The memory is not owned by this struct. The pointer is only valid for the lifetime documented by the API that produces or consumes it.
Fields§
§ptr: *const u8Pointer to the string bytes.
len: usizeLength of the string in bytes.
Implementations§
Trait Implementations§
impl Copy for String
Auto Trait Implementations§
impl !Send for String
impl !Sync for String
impl Freeze for String
impl RefUnwindSafe for String
impl Unpin for String
impl UnsafeUnpin 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