#[repr(C)]pub struct GhosttyString {
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§
Source§impl Clone for GhosttyString
impl Clone for GhosttyString
Source§fn clone(&self) -> GhosttyString
fn clone(&self) -> GhosttyString
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GhosttyString
impl Debug for GhosttyString
Source§impl Default for GhosttyString
impl Default for GhosttyString
Source§impl<S> From<S> for GhosttyString
impl<S> From<S> for GhosttyString
impl Copy for GhosttyString
Auto Trait Implementations§
impl Freeze for GhosttyString
impl RefUnwindSafe for GhosttyString
impl !Send for GhosttyString
impl !Sync for GhosttyString
impl Unpin for GhosttyString
impl UnsafeUnpin for GhosttyString
impl UnwindSafe for GhosttyString
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