We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6fbe93 commit 3d1545eCopy full SHA for 3d1545e
optee-utee/src/object.rs
@@ -224,6 +224,10 @@ impl ObjectHandle {
224
unsafe { *(self.raw) }
225
}
226
227
+ fn is_null(&self) -> bool {
228
+ self.raw.is_null()
229
+ }
230
+
231
fn from_raw(raw: *mut raw::TEE_ObjectHandle) -> ObjectHandle {
232
Self { raw }
233
@@ -517,6 +521,15 @@ impl TransientObject {
517
521
Self(ObjectHandle::from_raw(ptr::null_mut()))
518
522
519
523
524
+ /// Check if current object is created with null handle.
525
+ ///
526
+ /// # See Also
527
528
+ /// - [Self::null_object](Self::null_object).
529
+ pub fn is_null_object(&self) -> bool {
530
+ self.0.is_null()
531
532
520
533
/// Allocate an uninitialized [TransientObject](TransientObject), i.e. a container for attributes.
534
///
535
/// As allocated, the object is uninitialized.
0 commit comments