#[repr(C)]pub struct RUnit {
pub kind: RUnitKind,
pub custom: Option<String>,
}Expand description
FFI-safe mirror of Unit. Encoded as a kind discriminant plus a
custom payload that is Some(label) only when kind == Custom.
All other variants set custom: None.
Fields§
§kind: RUnitKind§custom: Option<String>Implementations§
Trait Implementations§
Source§impl IStable for RUnit
impl IStable for RUnit
Source§const REPORT: &'static TypeReport
const REPORT: &'static TypeReport
A compile-time generated report of the fields of the type, allowing for compatibility inspection.
Source§const ID: u64
const ID: u64
A stable (and ideally unique) identifier for the type. Often generated using
crate::report::gen_id, but can be manually set.Source§type ForbiddenValues = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::ForbiddenValues
type ForbiddenValues = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::ForbiddenValues
The values that the annotated type cannot occupy.
Source§type UnusedBits = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::UnusedBits
type UnusedBits = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::UnusedBits
The padding bits in the annotated types
Source§type Size = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::Size
type Size = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::Size
The size of the annotated type in bytes.
Source§type Align = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::Align
type Align = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::Align
The alignment of the annotated type in bytes.
Source§type HasExactlyOneNiche = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::HasExactlyOneNiche
type HasExactlyOneNiche = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::HasExactlyOneNiche
Allows the detection of whether or not
core::option::Options are stable: Read moreSource§type ContainsIndirections = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::ContainsIndirections
type ContainsIndirections = <Struct<FieldPair<RUnitKind, Option<String>>> as IStable>::ContainsIndirections
Whether or not the type contains indirections (pointers, indices in independent data-structures…)
Auto Trait Implementations§
impl Freeze for RUnit
impl RefUnwindSafe for RUnit
impl Send for RUnit
impl Sync for RUnit
impl Unpin for RUnit
impl UnsafeUnpin for RUnit
impl UnwindSafe for RUnit
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
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