Trait twizzler_runtime_api::ObjectRuntime
source · 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§
sourcefn map_object(
&self,
id: ObjID,
flags: MapFlags
) -> Result<ObjectHandle, MapError>
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.
sourcefn release_handle(&self, handle: &mut ObjectHandle)
fn release_handle(&self, handle: &mut ObjectHandle)
Called on drop of an object handle.
Provided Methods§
sourcefn map_two_objects(
&self,
in_id_a: ObjID,
in_flags_a: MapFlags,
in_id_b: ObjID,
in_flags_b: MapFlags
) -> Result<(ObjectHandle, ObjectHandle), MapError>
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.