pub struct DlpackLegacyExport { /* private fields */ }Expand description
Owner for a legacy DLPack managed tensor exported without copying CPU data.
This exists for consumers implementing the pre-1.0 capsule protocol.
Implementations§
Source§impl DlpackLegacyExport
impl DlpackLegacyExport
Sourcepub fn from_tensor(tensor: &TensorBuffer) -> Result<Self, DlpackError>
pub fn from_tensor(tensor: &TensorBuffer) -> Result<Self, DlpackError>
Shares an owned CPU tensor allocation with a legacy DLPack consumer.
Trait Implementations§
Source§impl Drop for DlpackLegacyExport
impl Drop for DlpackLegacyExport
Auto Trait Implementations§
impl Freeze for DlpackLegacyExport
impl RefUnwindSafe for DlpackLegacyExport
impl !Send for DlpackLegacyExport
impl !Sync for DlpackLegacyExport
impl Unpin for DlpackLegacyExport
impl UnsafeUnpin for DlpackLegacyExport
impl UnwindSafe for DlpackLegacyExport
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