pub struct ResidentBufferRef<'a> { /* private fields */ }Expand description
Borrowed, backend-visible memory range with a caller-owned lifetime.
Implementations§
Source§impl ResidentBufferRef<'_>
impl ResidentBufferRef<'_>
Sourcepub fn new(memory: DeviceMemoryRange) -> Result<Self, ResidentHandoffError>
pub fn new(memory: DeviceMemoryRange) -> Result<Self, ResidentHandoffError>
Build a borrowed resident buffer reference after validating basic range shape.
Sourcepub fn with_allocation_len(
memory: DeviceMemoryRange,
allocation_len: usize,
) -> Result<Self, ResidentHandoffError>
pub fn with_allocation_len( memory: DeviceMemoryRange, allocation_len: usize, ) -> Result<Self, ResidentHandoffError>
Build a borrowed resident buffer reference and validate it against an allocation length.
Sourcepub const fn memory_range(&self) -> DeviceMemoryRange
pub const fn memory_range(&self) -> DeviceMemoryRange
Return the opaque memory range.
Sourcepub const fn backend(&self) -> BackendKind
pub const fn backend(&self) -> BackendKind
Backend that owns this resident range.
Trait Implementations§
Source§impl<'a> Clone for ResidentBufferRef<'a>
impl<'a> Clone for ResidentBufferRef<'a>
Source§fn clone(&self) -> ResidentBufferRef<'a>
fn clone(&self) -> ResidentBufferRef<'a>
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<'a> Copy for ResidentBufferRef<'a>
Source§impl<'a> Debug for ResidentBufferRef<'a>
impl<'a> Debug for ResidentBufferRef<'a>
impl<'a> Eq for ResidentBufferRef<'a>
Source§impl<'a> PartialEq for ResidentBufferRef<'a>
impl<'a> PartialEq for ResidentBufferRef<'a>
Source§fn eq(&self, other: &ResidentBufferRef<'a>) -> bool
fn eq(&self, other: &ResidentBufferRef<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for ResidentBufferRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ResidentBufferRef<'a>
impl<'a> RefUnwindSafe for ResidentBufferRef<'a>
impl<'a> Send for ResidentBufferRef<'a>
impl<'a> Sync for ResidentBufferRef<'a>
impl<'a> Unpin for ResidentBufferRef<'a>
impl<'a> UnsafeUnpin for ResidentBufferRef<'a>
impl<'a> UnwindSafe for ResidentBufferRef<'a>
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more