pub(crate) struct RustStringInner {
pub(crate) bytes: RefCell<Vec<u8>>,
}
Expand description
Underlying implementation of RustString
.
Having two separate types makes it possible to use the opaque RustString
in FFI signatures without improper_ctypes
warnings. This is a workaround
for the fact that there is no way to opt out of improper_ctypes
when
declaring a type (as opposed to using that type).
Fields§
§bytes: RefCell<Vec<u8>>
Implementations§
Source§impl RustStringInner
impl RustStringInner
pub(crate) fn as_opaque(&self) -> &RustString
pub(crate) fn from_opaque(opaque: &RustString) -> &Self
pub(crate) fn into_inner(self) -> Vec<u8>
Trait Implementations§
Source§impl Default for RustStringInner
impl Default for RustStringInner
Source§fn default() -> RustStringInner
fn default() -> RustStringInner
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for RustStringInner
impl !RefUnwindSafe for RustStringInner
impl Send for RustStringInner
impl !Sync for RustStringInner
impl Unpin for RustStringInner
impl UnwindSafe for RustStringInner
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes