pub struct Object<T> { /* private fields */ }
Expand description
A handle for an object with base type T.
Implementations§
source§impl<BaseType> Object<BaseType>
impl<BaseType> Object<BaseType>
sourcepub unsafe fn base_unchecked(&self) -> &BaseType
pub unsafe fn base_unchecked(&self) -> &BaseType
Get a reference to the base of an object, bypassing version and tag checks.
§Safety
The caller must ensure that the base of the object really is of type BaseType.
sourcepub unsafe fn base_mut_unchecked(&self) -> &mut BaseType
pub unsafe fn base_mut_unchecked(&self) -> &mut BaseType
Get a mutable reference to the base of an object, bypassing version and tag checks.
§Safety
The caller must ensure that the base of the object really is of type BaseType.
source§impl<T> Object<T>
impl<T> Object<T>
sourcepub fn create_with(
spec: &CreateSpec,
f: impl FnOnce(&mut Object<MaybeUninit<T>>),
) -> Result<Self, CreateError>
pub fn create_with( spec: &CreateSpec, f: impl FnOnce(&mut Object<MaybeUninit<T>>), ) -> Result<Self, CreateError>
Create an object, setting up the initial value for the base in a closure.
source§impl<T: BaseType> Object<T>
impl<T: BaseType> Object<T>
sourcepub fn create<A>(spec: &CreateSpec, args: A) -> Result<Self, CreateError>
pub fn create<A>(spec: &CreateSpec, args: A) -> Result<Self, CreateError>
Create an object, setting up the initial value for base using the BaseType’s init function.
source§impl<T> Object<T>
impl<T> Object<T>
sourcepub fn init_id(
id: ObjID,
prot: Protections,
_flags: ObjectInitFlags,
) -> Result<Self, ObjectInitError>
pub fn init_id( id: ObjID, prot: Protections, _flags: ObjectInitFlags, ) -> Result<Self, ObjectInitError>
Initialize an object handle from an object ID.
source§impl<T> Object<T>
impl<T> Object<T>
sourcepub unsafe fn meta(&self) -> NonNull<MetaInfo>
pub unsafe fn meta(&self) -> NonNull<MetaInfo>
Get a mutable reference to the object’s meta info struct.
§Safety
See this crate’s base documentation (Isolation Safety).
sourcepub unsafe fn metaext(&self) -> NonNull<MetaExt>
pub unsafe fn metaext(&self) -> NonNull<MetaExt>
Get a mutable reference to the object’s first meta extension entry.
§Safety
See this crate’s base documentation (Isolation Safety).
sourcepub fn meta_nonce(&self) -> Nonce
pub fn meta_nonce(&self) -> Nonce
Get the nonce of the object.
sourcepub fn meta_flags(&self) -> MetaFlags
pub fn meta_flags(&self) -> MetaFlags
Get the meta flags of the object.
sourcepub fn meta_version(&self) -> BaseVersion
pub fn meta_version(&self) -> BaseVersion
Get the base version of the object.
sourcepub unsafe fn get_fote_unguarded(&self, idx: usize) -> *mut FotEntry
pub unsafe fn get_fote_unguarded(&self, idx: usize) -> *mut FotEntry
Get a mutable pointer to one of the object’s FOT entries.
§Safety
See this crate’s base documentation (Isolation Safety). Additionally, the caller must ensure the index does not exceed the number of FOT entries in the object.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Object<T>
impl<T> !ObjSafe for Object<T>
impl<T> RefUnwindSafe for Object<T>where
T: RefUnwindSafe,
impl<T> Send for Object<T>where
T: Send,
impl<T> Sync for Object<T>where
T: Sync,
impl<T> Unpin for Object<T>where
T: Unpin,
impl<T> UnwindSafe for Object<T>where
T: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)