#[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
Source§fn clone(&self) -> StbStringRef
fn clone(&self) -> StbStringRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl 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