Skip to main content

DiplomatStrSlice

Type Alias DiplomatStrSlice 

Source
pub type DiplomatStrSlice<'a> = DiplomatSlice<'a, u8>;
Expand description

This like &str, but unvalidated and safe to use over FFI

This type will usually map to some string type in the target language, and you will not need to worry about the safety of mismatched string invariants.

Aliased Type§

#[repr(C)]
pub struct DiplomatStrSlice<'a> { ptr: *const u8, len: usize, phantom: PhantomData<&'a [u8]>, }

Fields§

§ptr: *const u8§len: usize§phantom: PhantomData<&'a [u8]>