pub struct ArrayBinding<R: Runtime> {
pub handle: Binding,
/* private fields */
}Expand description
Tensor representation with a reference to the server handle.
Fields§
§handle: BindingImplementations§
Source§impl<R: Runtime> ArrayBinding<R>
impl<R: Runtime> ArrayBinding<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 array 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 array 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 an array.
Auto Trait Implementations§
impl<R> Freeze for ArrayBinding<R>
impl<R> !RefUnwindSafe for ArrayBinding<R>
impl<R> Send for ArrayBinding<R>
impl<R> Sync for ArrayBinding<R>
impl<R> Unpin for ArrayBinding<R>where
R: Unpin,
impl<R> UnsafeUnpin for ArrayBinding<R>
impl<R> !UnwindSafe for ArrayBinding<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