#[repr(C)]pub struct BytesVt_Layout{
pub retain: CLayoutOf<Option<unsafe extern "C" fn(*const (), usize)>>,
pub release: CLayoutOf<Option<unsafe extern "C" fn(*const (), usize)>>,
}
Expand description
The vtable for Bytes
, allowing it to retain
and release
the underlying storage if applicable.
Fields§
§retain: CLayoutOf<Option<unsafe extern "C" fn(*const (), usize)>>
If non-null, this function allows shared ownership, and acts as the refcount incrementer.
release: CLayoutOf<Option<unsafe extern "C" fn(*const (), usize)>>
If non-null, Bytes
is considered to own its data, and calling release
N + 1
times (where N
is the number of times retain
was called if available) will release said data. The Bytes
slice
is considered valid until that N + 1
th release
.
Trait Implementations§
Source§impl CType for BytesVt_Layout
impl CType for BytesVt_Layout
type OPAQUE_KIND = Concrete
fn short_name() -> String
fn define_self__impl( language: &dyn HeaderLanguage, definer: &mut dyn Definer, ) -> Result<()>
fn zeroed() -> Self
fn define_self( language: &dyn HeaderLanguage, definer: &mut dyn Definer, ) -> Result<()>
fn name(_language: &dyn HeaderLanguage) -> String
fn name_wrapping_var(language: &dyn HeaderLanguage, var_name: &str) -> String
Source§fn csharp_marshaler() -> Option<String>
fn csharp_marshaler() -> Option<String>
Optional marshaler attached to the type (e.g.,
[MarshalAs(UnmanagedType.FunctionPtr)]
)Source§impl Clone for BytesVt_Layout
impl Clone for BytesVt_Layout
Source§impl ReprC for BytesVt_Layout
impl ReprC for BytesVt_Layout
impl Copy for BytesVt_Layout
Auto Trait Implementations§
impl Freeze for BytesVt_Layout
impl RefUnwindSafe for BytesVt_Layout
impl Send for BytesVt_Layout
impl Sync for BytesVt_Layout
impl Unpin for BytesVt_Layout
impl UnwindSafe for BytesVt_Layout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FitForCBox for T
impl<T> FitForCBox for T
Source§type CBoxWrapped = Box_<T>
type CBoxWrapped = Box_<T>
Available on crate feature
alloc
only.Source§impl<T> ManuallyDropMut for T
impl<T> ManuallyDropMut for T
type Ret = ManuallyDrop<T>
fn manually_drop_mut<'__>(&'__ mut self) -> &'__ mut ManuallyDrop<T>
Source§impl<T> UpcastAny for Twhere
T: 'static,
impl<T> UpcastAny for Twhere
T: 'static,
Source§fn upcast_any(&self) -> &(dyn Any + 'static)
fn upcast_any(&self) -> &(dyn Any + 'static)
Available on crate feature
headers
only.