pub struct ResidentHandle { /* private fields */ }Expand description
A resident buffer handle that names both the buffer and the backend instance that owns it.
Carrying the owner is what makes presenting a foreign handle a refusal at the API boundary rather than a silent resolve against unrelated device memory, so a caller can hold a handle across instances without having to remember a check.
Implementations§
Source§impl ResidentHandle
impl ResidentHandle
Sourcepub fn owner(self) -> ResidentOwner
pub fn owner(self) -> ResidentOwner
Backend instance that allocated this buffer.
Sourcepub fn id(self) -> u64
pub fn id(self) -> u64
Buffer id within its owner’s namespace.
Only meaningful together with ResidentHandle::owner; use
ResidentOwner::resolve to obtain it for a lookup.
Trait Implementations§
Source§impl Clone for ResidentHandle
impl Clone for ResidentHandle
Source§fn clone(&self) -> ResidentHandle
fn clone(&self) -> ResidentHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResidentHandle
Source§impl Debug for ResidentHandle
impl Debug for ResidentHandle
Source§impl Display for ResidentHandle
impl Display for ResidentHandle
impl Eq for ResidentHandle
Source§impl From<ResidentHandle> for Resource
impl From<ResidentHandle> for Resource
Source§fn from(handle: ResidentHandle) -> Self
fn from(handle: ResidentHandle) -> Self
Converts to this type from the input type.
Source§impl Hash for ResidentHandle
impl Hash for ResidentHandle
Source§impl PartialEq for ResidentHandle
impl PartialEq for ResidentHandle
impl StructuralPartialEq for ResidentHandle
Auto Trait Implementations§
impl Freeze for ResidentHandle
impl RefUnwindSafe for ResidentHandle
impl Send for ResidentHandle
impl Sync for ResidentHandle
impl Unpin for ResidentHandle
impl UnsafeUnpin for ResidentHandle
impl UnwindSafe for ResidentHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.