pub trait PlaceExt {
// Required methods
fn ty(
&self,
genv: GlobalEnv<'_, '_>,
local_decls: &LocalDecls,
) -> QueryResult<PlaceTy>;
fn behind_raw_ptr(
&self,
genv: GlobalEnv<'_, '_>,
local_decls: &LocalDecls,
) -> QueryResult<bool>;
fn min_pack(
&self,
genv: GlobalEnv<'_, '_>,
local_decls: &LocalDecls,
) -> QueryResult<Option<u64>>;
}Required Methods§
fn ty( &self, genv: GlobalEnv<'_, '_>, local_decls: &LocalDecls, ) -> QueryResult<PlaceTy>
fn behind_raw_ptr( &self, genv: GlobalEnv<'_, '_>, local_decls: &LocalDecls, ) -> QueryResult<bool>
Sourcefn min_pack(
&self,
genv: GlobalEnv<'_, '_>,
local_decls: &LocalDecls,
) -> QueryResult<Option<u64>>
fn min_pack( &self, genv: GlobalEnv<'_, '_>, local_decls: &LocalDecls, ) -> QueryResult<Option<u64>>
Compute the minimum packedness of all Adts within a Place. For example:
#[repr(packed(4))] struct Z {}; #[repr(packed(2)] struct X {y: Z}
When taking a reference to .y, this would be the minimum of 4 and 2
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl PlaceExt for Place
impl PlaceExt for Place
Source§fn min_pack(
&self,
genv: GlobalEnv<'_, '_>,
local_decls: &LocalDecls,
) -> QueryResult<Option<u64>>
fn min_pack( &self, genv: GlobalEnv<'_, '_>, local_decls: &LocalDecls, ) -> QueryResult<Option<u64>>
Compute the minimum packedness of all Adts within a Place. For example:
#[repr(packed(4))] struct Z {}; #[repr(packed(2)] struct X {y: Z}
When taking a reference to .y, this would be the minimum of 4 and 2