Struct safer_ffi::vec::Vec_Layout
source · [−]#[repr(C)]pub struct Vec_Layout<T> where
NonNullOwned<T>: ReprC,
usize: ReprC,
usize: ReprC,
T: ReprC, {
pub ptr: <NonNullOwned<T> as ReprC>::CLayout,
pub len: <usize as ReprC>::CLayout,
pub cap: <usize as ReprC>::CLayout,
}
Available on crate feature
alloc
only.Fields
ptr: <NonNullOwned<T> as ReprC>::CLayout
len: <usize as ReprC>::CLayout
cap: <usize as ReprC>::CLayout
Trait Implementations
sourceimpl<T> CType for Vec<T> where
<NonNullOwned<T> as ReprC>::CLayout: CType,
<usize as ReprC>::CLayout: CType,
<usize as ReprC>::CLayout: CType,
T: ReprC,
NonNullOwned<T>: ReprC,
usize: ReprC,
usize: ReprC,
T: ReprC,
impl<T> CType for Vec<T> where
<NonNullOwned<T> as ReprC>::CLayout: CType,
<usize as ReprC>::CLayout: CType,
<usize as ReprC>::CLayout: CType,
T: ReprC,
NonNullOwned<T>: ReprC,
usize: ReprC,
usize: ReprC,
T: ReprC,
sourcefn c_short_name_fmt(fmt: &mut Formatter<'_>) -> Result
fn c_short_name_fmt(fmt: &mut Formatter<'_>) -> Result
A short-name description of the type, mainly used to fill “placeholders” such as when monomorphising generics structs or arrays. Read more
sourcefn c_define_self(definer: &mut dyn Definer) -> Result<()>
fn c_define_self(definer: &mut dyn Definer) -> Result<()>
Necessary one-time code for CType::c_var
()
to make sense. Read more
sourcefn c_var_fmt(fmt: &mut Formatter<'_>, var_name: &str) -> Result
fn c_var_fmt(fmt: &mut Formatter<'_>, var_name: &str) -> Result
The core method of the trait: it provides the implementation to be
used by CType::c_var
, by bringing a Formatter
in scope. Read more
type OPAQUE_KIND = Concrete
sourcefn c_short_name() -> ImplDisplay<Self>
fn c_short_name() -> ImplDisplay<Self>
impl<T> Copy for Vec<T> where
NonNullOwned<T>: ReprC,
usize: ReprC,
usize: ReprC,
T: ReprC,
Auto Trait Implementations
impl<T> !RefUnwindSafe for Vec<T>
impl<T> !Send for Vec<T>
impl<T> !Sync for Vec<T>
impl<T> !Unpin for Vec<T>
impl<T> !UnwindSafe for Vec<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ManuallyDropMut for T
impl<T> ManuallyDropMut for T
type Ret = ManuallyDrop<T>
fn manually_drop_mut(&'__ mut self) -> &'__ mut ManuallyDrop<T>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more