pub struct EvalHandle { /* private fields */ }Expand description
Lazy evaluation handle returned by eval().
Computes output shape from input shapes but defers actual evaluation until the caller chooses a consumption mode.
Implementations§
Source§impl EvalHandle
impl EvalHandle
Sourcepub fn shape(&self) -> &[usize]
pub fn shape(&self) -> &[usize]
Output shape. Empty for scalar output, [n] for 1-D, [n, m] for 2-D, etc.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether the output is empty (zero elements due to empty input array).
Sourcepub fn scalar(self) -> Result<NumericResult, EvalError>
pub fn scalar(self) -> Result<NumericResult, EvalError>
Consume as scalar. Errors if output is not 0-d.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EvalHandle
impl RefUnwindSafe for EvalHandle
impl Send for EvalHandle
impl Sync for EvalHandle
impl Unpin for EvalHandle
impl UnsafeUnpin for EvalHandle
impl UnwindSafe for EvalHandle
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