pub trait ObjectRuntime {
    // Required methods
    fn map_object(
        &self,
        id: ObjID,
        flags: MapFlags
    ) -> Result<ObjectHandle, MapError>;
    fn release_handle(&self, handle: &mut ObjectHandle);

    // Provided method
    fn map_two_objects(
        &self,
        in_id_a: ObjID,
        in_flags_a: MapFlags,
        in_id_b: ObjID,
        in_flags_b: MapFlags
    ) -> Result<(ObjectHandle, ObjectHandle), MapError> { ... }
}
Expand description

All the object related runtime functions.

Required Methods§

source

fn map_object( &self, id: ObjID, flags: MapFlags ) -> Result<ObjectHandle, MapError>

Map an object to an ObjectHandle. The handle may reference the same internal mapping as other calls to this function.

source

fn release_handle(&self, handle: &mut ObjectHandle)

Called on drop of an object handle.

Provided Methods§

source

fn map_two_objects( &self, in_id_a: ObjID, in_flags_a: MapFlags, in_id_b: ObjID, in_flags_b: MapFlags ) -> Result<(ObjectHandle, ObjectHandle), MapError>

Map two objects in sequence, useful for executable loading. The default implementation makes no guarantees about ordering.

Implementors§