#[repr(C)]pub struct StbStringRef {
pub ptr: *const c_char,
pub len: usize,
}Expand description
A borrowed, non-owning view of a string passed as an input to an FFI call. The callee MUST NOT free it and MUST NOT retain it past the call.
Built from a &str on the calling side; the buffer is valid for the
duration of the call (the caller’s borrow).
Fields§
§ptr: *const c_charUTF-8 bytes (valid for the call; NUL-terminated not required).
len: usizeByte length.
Implementations§
Trait Implementations§
Source§impl Clone for StbStringRef
impl Clone for StbStringRef
impl Copy for StbStringRef
impl Send for StbStringRef
impl Sync for StbStringRef
Auto Trait Implementations§
impl Freeze for StbStringRef
impl RefUnwindSafe for StbStringRef
impl Unpin for StbStringRef
impl UnsafeUnpin for StbStringRef
impl UnwindSafe for StbStringRef
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