pub struct BufferBinding<R: Runtime> {
pub handle: Binding,
/* private fields */
}Expand description
Buffer representation with a reference to the server handle.
Fields§
§handle: BindingImplementations§
Source§impl<R: Runtime> BufferBinding<R>
impl<R: Runtime> BufferBinding<R>
Sourcepub unsafe fn from_raw_parts(handle: Handle, length: usize) -> Self
pub unsafe fn from_raw_parts(handle: Handle, length: usize) -> Self
Create a new buffer handle reference.
§Safety
Specifying the wrong length may lead to out-of-bounds reads and writes.
Sourcepub unsafe fn from_raw_parts_binding(handle: Binding, length: usize) -> Self
pub unsafe fn from_raw_parts_binding(handle: Binding, length: usize) -> Self
Create a new buffer handle reference.
§Safety
Specifying the wrong length or size, may lead to out-of-bounds reads and writes.
Sourcepub fn into_tensor(self) -> TensorBinding<R>
pub fn into_tensor(self) -> TensorBinding<R>
Return the handle as a tensor instead of a buffer.
Auto Trait Implementations§
impl<R> !RefUnwindSafe for BufferBinding<R>
impl<R> !UnwindSafe for BufferBinding<R>
impl<R> Freeze for BufferBinding<R>
impl<R> Send for BufferBinding<R>
impl<R> Sync for BufferBinding<R>
impl<R> Unpin for BufferBinding<R>where
R: Unpin,
impl<R> UnsafeUnpin for BufferBinding<R>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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