pub struct ReadOnly<T>(pub T);Expand description
Small wrapper type to mark a tensor as read-only when there is a choice between a read-only and a read-write implementation.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T> TryFrom<ReadOnly<Arc<RwLock<Vec<T>>>>> for DLPackTensorwhere
T: GetDLPackDataType + 'static,
impl<T> TryFrom<ReadOnly<Arc<RwLock<Vec<T>>>>> for DLPackTensorwhere
T: GetDLPackDataType + 'static,
Auto Trait Implementations§
impl<T> Freeze for ReadOnly<T>where
T: Freeze,
impl<T> RefUnwindSafe for ReadOnly<T>where
T: RefUnwindSafe,
impl<T> Send for ReadOnly<T>where
T: Send,
impl<T> Sync for ReadOnly<T>where
T: Sync,
impl<T> Unpin for ReadOnly<T>where
T: Unpin,
impl<T> UnsafeUnpin for ReadOnly<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ReadOnly<T>where
T: UnwindSafe,
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