pub struct AbiTraitDefinition {
pub name: String,
pub methods: Vec<AbiMethod>,
pub sync: bool,
pub send: bool,
}Expand description
Defines a dyn trait, basically
Fields§
§name: StringThe name of the trait
methods: Vec<AbiMethod>The set of methods available on the trait
sync: boolTrue if this object is ‘Sync’
send: boolTrue if this object is ‘Send’
Implementations§
Source§impl AbiTraitDefinition
impl AbiTraitDefinition
Sourcepub fn verify_backward_compatible(
&self,
old_version: u32,
old: &AbiTraitDefinition,
is_return_position: bool,
) -> Result<(), SavefileError>
pub fn verify_backward_compatible( &self, old_version: u32, old: &AbiTraitDefinition, is_return_position: bool, ) -> Result<(), SavefileError>
Verify that ‘self’ represents a newer version of a trait, that is backward compatible with ‘old’. ‘old_version’ is the version number of the old version being inspected. To guarantee compatibility, all versions must be checked
old is the callee, self is the caller
Trait Implementations§
Source§impl Clone for AbiTraitDefinition
impl Clone for AbiTraitDefinition
Source§fn clone(&self) -> AbiTraitDefinition
fn clone(&self) -> AbiTraitDefinition
Returns a duplicate 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 AbiTraitDefinition
impl Debug for AbiTraitDefinition
Source§impl Default for AbiTraitDefinition
impl Default for AbiTraitDefinition
Source§fn default() -> AbiTraitDefinition
fn default() -> AbiTraitDefinition
Returns the “default value” for a type. Read more
Source§impl Deserialize for AbiTraitDefinition
impl Deserialize for AbiTraitDefinition
Source§fn deserialize(
deserializer: &mut Deserializer<'_, impl Read>,
) -> Result<Self, SavefileError>
fn deserialize( deserializer: &mut Deserializer<'_, impl Read>, ) -> Result<Self, SavefileError>
Deserialize and return an instance of Self from the given deserializer.
Source§impl Packed for AbiTraitDefinition
impl Packed for AbiTraitDefinition
Source§unsafe fn repr_c_optimization_safe(_version: u32) -> IsPacked
unsafe fn repr_c_optimization_safe(_version: u32) -> IsPacked
This method returns true if the optimization is allowed
for the protocol version given as an argument.
This may return true if and only if the given protocol version
has a serialized format identical to the memory layout of the given protocol version.
Note, the only memory layout existing is that of the most recent version, so
Packed-optimization only works when disk-format is identical to memory version. Read more
Source§impl PartialEq for AbiTraitDefinition
impl PartialEq for AbiTraitDefinition
Source§impl Serialize for AbiTraitDefinition
impl Serialize for AbiTraitDefinition
Source§fn serialize(
&self,
serializer: &mut Serializer<'_, impl Write>,
) -> Result<(), SavefileError>
fn serialize( &self, serializer: &mut Serializer<'_, impl Write>, ) -> Result<(), SavefileError>
Serialize self into the given serializer. Read more
Source§impl WithSchema for AbiTraitDefinition
impl WithSchema for AbiTraitDefinition
impl StructuralPartialEq for AbiTraitDefinition
Auto Trait Implementations§
impl Freeze for AbiTraitDefinition
impl RefUnwindSafe for AbiTraitDefinition
impl Send for AbiTraitDefinition
impl Sync for AbiTraitDefinition
impl Unpin for AbiTraitDefinition
impl UnwindSafe for AbiTraitDefinition
Blanket Implementations§
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