pub struct BehaviorString;Expand description
The std lib’s String type behavior.
We currently use a CString from to ingest all String values. This might be unsafe if the string
was instantiated by the caller without using rust’s instanciation mechanism. In that case, it
would be safe to use a CStr. See https://doc.rust-lang.org/std/ffi/struct.CString.html
Trait Implementations§
Source§impl Behavior for Behavior
impl Behavior for Behavior
fn is(&self, sty: &Type) -> bool
fn imports(&self, _sty: &Type, pkg: &str, _crate_name: &str) -> Vec<String>
fn name(&self, _sty: &Type) -> String
fn ffi(&self, _sty: &Type) -> String
fn native(&self, _sty: &Type) -> String
fn native_to_ffi(&self, _sty: &Type, expr: String) -> String
fn ffi_to_native(&self, _sty: &Type, expr: String) -> String
fn shim(&self, sty: &Type) -> String
Auto Trait Implementations§
impl Freeze for Behavior
impl RefUnwindSafe for Behavior
impl Send for Behavior
impl Sync for Behavior
impl Unpin for Behavior
impl UnsafeUnpin for Behavior
impl UnwindSafe for Behavior
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