#[repr(C)]pub struct moq_string {
pub data: *const c_char,
pub len: usize,
}Expand description
A borrowed UTF-8 string slice, NOT NULL terminated.
Used to hand a C caller a JSON document that lives inside libmoq’s storage. The pointer borrows that storage and is only valid until the owning resource is freed (see the function that fills it for the exact lifetime).
Fields§
§data: *const c_charPointer to len bytes of UTF-8, NOT NULL terminated.
len: usizeAuto Trait Implementations§
impl !Send for moq_string
impl !Sync for moq_string
impl Freeze for moq_string
impl RefUnwindSafe for moq_string
impl Unpin for moq_string
impl UnsafeUnpin for moq_string
impl UnwindSafe for moq_string
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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