#[repr(transparent)]pub struct c_int(pub c_int);
Expand description
A ReprC
standalone type with the same layout and ABI as
::libc::c_int
.
By standalone, the idea is that this is defined as a (transparent
) newtype struct
,
rather than as a type
alias, which is error-prone and yields less-portable headers (since
the header generation will resolve the type alias and emit, for instance, int32_t
, ⚠️).
By using this type, you guarantee that the C int
type be used in the headers.
Tuple Fields
0: c_int
Trait Implementations
sourceimpl LegacyCType for c_int
impl LegacyCType for c_int
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_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 moresourcefn c_define_self(_: &mut dyn Definer) -> Result<()>
fn c_define_self(_: &mut dyn Definer) -> Result<()>
sourcefn csharp_define_self(_: &mut dyn Definer) -> Result<()>
fn csharp_define_self(_: &mut dyn Definer) -> Result<()>
Extra typedef code (e.g.
[LayoutKind.Sequential] struct ...
)sourcefn legacy_csharp_marshaler() -> Option<String>
fn legacy_csharp_marshaler() -> Option<String>
Optional marshaler attached to the type (e.g.,
[MarshalAs(UnmanagedType.FunctionPtr)]
) Read moretype OPAQUE_KIND = Concrete
sourcefn c_short_name() -> ImplDisplay<Self>
fn c_short_name() -> ImplDisplay<Self>
sourcefn csharp_var(var_name: &str) -> String
fn csharp_var(var_name: &str) -> String
Convenience function for formatting
{ty} {var}
in CSharp.impl Copy for c_int
impl Eq for c_int
impl StructuralEq for c_int
impl StructuralPartialEq for c_int
Auto Trait Implementations
impl RefUnwindSafe for c_int
impl Send for c_int
impl Sync for c_int
impl Unpin for c_int
impl UnwindSafe for c_int
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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> CType for Twhere
T: LegacyCType,
impl<T> CType for Twhere
T: LegacyCType,
type OPAQUE_KIND = <T as LegacyCType>::OPAQUE_KIND
fn short_name() -> String
fn define_self__impl(
&(dyn HeaderLanguage + 'static),
&mut dyn Definer
) -> Result<(), Error>
fn define_self(
language: &(dyn HeaderLanguage + 'static),
definer: &mut dyn Definer
) -> Result<(), Error>
fn name(language: &(dyn HeaderLanguage + 'static)) -> String
fn name_wrapping_var(
language: &(dyn HeaderLanguage + 'static),
var_name: &str
) -> String
sourcefn csharp_marshaler() -> Option<String>
fn csharp_marshaler() -> Option<String>
Optional marshaler attached to the type (e.g.,
[MarshalAs(UnmanagedType.FunctionPtr)]
) Read morefn zeroed() -> Self
sourceimpl<T> CompatExt for T
impl<T> CompatExt for T
sourceimpl<T> FitForCBox for T
impl<T> FitForCBox for T
type CBoxWrapped = Box_<T>
type CBoxWrapped = Box_<T>
Available on crate feature
alloc
only.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> UpcastAny for Twhere
T: 'static,
impl<T> UpcastAny for Twhere
T: 'static,
sourcefn upcast_any(&self) -> &(dyn Any + 'static)
fn upcast_any(&self) -> &(dyn Any + 'static)
Available on crate feature
headers
only.