pub struct ObjectInfo { /* private fields */ }Expand description
Represent the characteristics of an object. This info can be returned by GenericObject function info
Implementations§
Source§impl ObjectInfo
impl ObjectInfo
Sourcepub fn from_raw(raw: TEE_ObjectInfo) -> Self
pub fn from_raw(raw: TEE_ObjectInfo) -> Self
Return an ObjectInfo struct based on the raw
structure TEE_ObjectInfo.
The raw structure contains following fields:
objectType: The parameter represents one of the TransientObjectType.objectSize: The current size in bits of the object as determined by its attributes. This will always be less than or equal to maxObjectSize. Set to 0 for uninitialized and data only objects.maxObjectSize: The maximum objectSize which this object can represent.- For a PersistentObject, set to
objectSize. - For a TransientObject, set to the
parameter
maxObjectSizepassed to allocate.
- For a PersistentObject, set to
objectUsage: A bit vector of UsageFlag.dataSize:- For a PersistentObject, set to the current size of the data associated with the object.
- For a TransientObject, always set to 0.
dataPosition:- For a PersistentObject, set to the current position in the data for this handle. Data positions for different handles on the same object may differ.
- For a TransientObject, set to 0.
handleFlags: A bit vector containing one or more HandleFlag or DataFlag.
Sourcepub fn data_size(&self) -> usize
pub fn data_size(&self) -> usize
Return the dataSize field of the raw structure TEE_ObjectInfo.
Sourcepub fn object_size(&self) -> usize
pub fn object_size(&self) -> usize
Return the objectSize field of the raw structure TEE_ObjectInfo.
Sourcepub fn object_type(&self) -> u32
pub fn object_type(&self) -> u32
Return the objectType field of the raw structure TEE_ObjectInfo.
Auto Trait Implementations§
impl Freeze for ObjectInfo
impl RefUnwindSafe for ObjectInfo
impl Send for ObjectInfo
impl Sync for ObjectInfo
impl Unpin for ObjectInfo
impl UnsafeUnpin for ObjectInfo
impl UnwindSafe for ObjectInfo
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