pub struct Compatibility {
    pub struct_and_function_linking: bool,
    pub struct_layout: bool,
}
Expand description

The result of a linking and layout compatibility check. Here is what the different combinations mean: { struct: true, struct_layout: true }: fully backward compatible { struct_and_function_linking: true, struct_layout: false }: Dependent modules that reference functions or types in this module may not link. However, fixing, recompiling, and redeploying all dependent modules will work–no data migration needed. { type_and_function_linking: true, struct_layout: false }: Attempting to read structs published by this module will now fail at runtime. However, dependent modules will continue to link. Requires data migration, but no changes to dependent modules. { type_and_function_linking: false, struct_layout: false }: Everything is broken. Need both a data migration and changes to dependent modules.

Fields§

§struct_and_function_linking: bool

If false, dependent modules that reference functions or structs in this module may not link

§struct_layout: bool

If false, attempting to read structs previously published by this module will fail at runtime

Implementations§

source§

impl Compatibility

source

pub fn is_fully_compatible(&self) -> bool

Return true if the two module s compared in the compatiblity check are both linking and layout compatible.

source

pub fn check(old_module: &Module, new_module: &Module) -> Compatibility

Return compatibility assessment for new_module relative to old module old_module.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V