#[repr(C)]pub struct TypeReport {
pub name: Str<'static>,
pub module: Str<'static>,
pub fields: StableLike<Option<&'static FieldReport>, usize>,
pub tyty: TyTy,
pub version: u32,
}Expand description
A report of a type’s layout.
Fields§
§name: Str<'static>The type’s name.
module: Str<'static>The type’s parent module’s path.
fields: StableLike<Option<&'static FieldReport>, usize>The fields of this type.
tyty: TyTyHow the type was declared
version: u32The version of the type’s invariants.
Implementations§
Source§impl TypeReport
impl TypeReport
Sourcepub const fn has_optimal_layout() -> bool
pub const fn has_optimal_layout() -> bool
Returns true if the layout for TypeReport is smaller or equal to that Rust would have generated for it.
Source§impl TypeReport
impl TypeReport
Sourcepub fn is_compatible(&self, other: &Self) -> bool
pub fn is_compatible(&self, other: &Self) -> bool
Whether or not two reports correspond to the same type, with the same layout and invariants.
Trait Implementations§
Source§impl Clone for TypeReport
impl Clone for TypeReport
Source§fn clone(&self) -> TypeReport
fn clone(&self) -> TypeReport
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeReport
impl Debug for TypeReport
Source§impl Display for TypeReport
impl Display for TypeReport
Source§impl Hash for TypeReport
impl Hash for TypeReport
Source§impl IStable for TypeReport
impl IStable for TypeReport
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<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::ForbiddenValues
type ForbiddenValues = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::ForbiddenValues
The values that the annotated type cannot occupy.
Source§type UnusedBits = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::UnusedBits
type UnusedBits = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::UnusedBits
The padding bits in the annotated types
Source§type Size = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::Size
type Size = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::Size
The size of the annotated type in bytes.
Source§type Align = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::Align
type Align = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::Align
The alignment of the annotated type in bytes.
Source§type HasExactlyOneNiche = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::HasExactlyOneNiche
type HasExactlyOneNiche = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::HasExactlyOneNiche
Allows the detection of whether or not
core::option::Options are stable: Read moreSource§type ContainsIndirections = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::ContainsIndirections
type ContainsIndirections = <Struct<FieldPair<FieldPair<FieldPair<FieldPair<Str<'static>, Str<'static>>, StableLike<Option<&'static FieldReport>, usize>>, TyTy>, u32>> as IStable>::ContainsIndirections
Whether or not the type contains indirections (pointers, indices in independent data-structures…)
Source§impl PartialEq for TypeReport
impl PartialEq for TypeReport
impl Copy for TypeReport
impl Eq for TypeReport
impl StructuralPartialEq for TypeReport
Auto Trait Implementations§
impl Freeze for TypeReport
impl RefUnwindSafe for TypeReport
impl Send for TypeReport
impl Sync for TypeReport
impl Unpin for TypeReport
impl UnwindSafe for TypeReport
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