pub struct ScopedExecutionBundle<'env> { /* private fields */ }Expand description
Owned outputs and borrowed identity views from one completed scoped call.
Implementations§
Source§impl<'env> ScopedExecutionBundle<'env>
impl<'env> ScopedExecutionBundle<'env>
Sourcepub fn output(&self, index: usize) -> Result<OutputRef<'_>, OutputAccessError>
pub fn output(&self, index: usize) -> Result<OutputRef<'_>, OutputAccessError>
Borrow one completed output.
§Errors
Returns OutputAccessError::InvalidOutput for an invalid output
index or OutputAccessError::Group when the completed descriptor
group reports an output access failure.
Sourcepub fn into_owned_output(
self,
index: usize,
) -> Result<Tensor, (Self, ScopedOutputExtractError)>
pub fn into_owned_output( self, index: usize, ) -> Result<Tensor, (Self, ScopedOutputExtractError)>
Consume the bundle and extract a fresh owned output.
§Errors
Returns ScopedOutputExtractError::InvalidOutput,
ScopedOutputExtractError::BorrowedOutput, or
ScopedOutputExtractError::MetadataOutput for an output that cannot
be consumed, and ScopedOutputExtractError::Output for a structural
group extraction failure. Each error returns the unchanged bundle.
Trait Implementations§
Auto Trait Implementations§
impl<'env> !Freeze for ScopedExecutionBundle<'env>
impl<'env> !RefUnwindSafe for ScopedExecutionBundle<'env>
impl<'env> !UnwindSafe for ScopedExecutionBundle<'env>
impl<'env> Send for ScopedExecutionBundle<'env>
impl<'env> Sync for ScopedExecutionBundle<'env>
impl<'env> Unpin for ScopedExecutionBundle<'env>
impl<'env> UnsafeUnpin for ScopedExecutionBundle<'env>
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
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