Struct stabby_abi::report::TypeReport
source · #[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: TyTy
How the type was declared
version: u32
The 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
§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.
§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
§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.
§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.
§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::Option
s are stable: Read more§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§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§impl PartialEq for TypeReport
impl PartialEq for TypeReport
source§fn eq(&self, other: &TypeReport) -> bool
fn eq(&self, other: &TypeReport) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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