Struct dlpackrs::tensor::ManagedTensorProxy
source · [−]#[repr(C)]pub struct ManagedTensorProxy<C> {
pub dl_tensor: DLTensor,
pub manager_ctx: ManagerContext<C>,
pub deleter: Option<fn(_: &mut ManagedTensor<'_, C>)>,
}
Expand description
Safe proxy to ffi::DLManagedTensor which is self-referential by design. See DLManagedTensor
Fields
dl_tensor: DLTensor
Holds the underlying tensor.
manager_ctx: ManagerContext<C>
The context holding the underlying DLTensor.
deleter: Option<fn(_: &mut ManagedTensor<'_, C>)>
Deleter function pointer.
Implementations
Trait Implementations
sourceimpl<C: Debug> Debug for ManagedTensorProxy<C>
impl<C: Debug> Debug for ManagedTensorProxy<C>
sourceimpl<C> Drop for ManagedTensorProxy<C>
impl<C> Drop for ManagedTensorProxy<C>
sourceimpl<C> From<DLManagedTensor> for ManagedTensorProxy<C>
impl<C> From<DLManagedTensor> for ManagedTensorProxy<C>
sourcefn from(dlmt: DLManagedTensor) -> Self
fn from(dlmt: DLManagedTensor) -> Self
Converts to this type from the input type.
sourceimpl<C> From<ManagedTensorProxy<C>> for DLManagedTensor
impl<C> From<ManagedTensorProxy<C>> for DLManagedTensor
sourcefn from(pmt: ManagedTensorProxy<C>) -> Self
fn from(pmt: ManagedTensorProxy<C>) -> Self
Converts to this type from the input type.
impl<'pin, C> Unpin for ManagedTensorProxy<C>where
__ManagedTensorProxy<'pin, C>: Unpin,
Auto Trait Implementations
impl<C> RefUnwindSafe for ManagedTensorProxy<C>where
C: RefUnwindSafe,
impl<C> !Send for ManagedTensorProxy<C>
impl<C> !Sync for ManagedTensorProxy<C>
impl<C> UnwindSafe for ManagedTensorProxy<C>where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more