pub enum ShapeGuardError {
LocalWithoutAttachedGraph {
local_id: usize,
},
LocalOutOfBounds {
local_id: usize,
},
MissingMetadata {
key: ValueKey<StdTensorOp>,
},
NonExactShape {
key: ValueKey<StdTensorOp>,
},
}Expand description
Error returned when shape-guard metadata cannot be resolved.
§Examples
use tenferro_ops::ShapeGuardError;
let error = ShapeGuardError::LocalWithoutAttachedGraph { local_id: 0 };
assert!(error.to_string().contains("attached graph"));Variants§
LocalWithoutAttachedGraph
A local graph value was queried before a graph was attached.
LocalOutOfBounds
A local graph value id is outside the attached graph’s value table.
MissingMetadata
No metadata was registered for the resolved value key.
Fields
§
key: ValueKey<StdTensorOp>Resolved value key.
NonExactShape
Metadata exists, but at least one axis is only bounded or unknown.
Fields
§
key: ValueKey<StdTensorOp>Resolved value key.
Trait Implementations§
Source§impl Clone for ShapeGuardError
impl Clone for ShapeGuardError
Source§fn clone(&self) -> ShapeGuardError
fn clone(&self) -> ShapeGuardError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShapeGuardError
impl Debug for ShapeGuardError
Source§impl Display for ShapeGuardError
impl Display for ShapeGuardError
Source§impl Error for ShapeGuardError
impl Error for ShapeGuardError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ShapeGuardError
impl PartialEq for ShapeGuardError
Source§fn eq(&self, other: &ShapeGuardError) -> bool
fn eq(&self, other: &ShapeGuardError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ShapeGuardError
impl StructuralPartialEq for ShapeGuardError
Auto Trait Implementations§
impl Freeze for ShapeGuardError
impl !RefUnwindSafe for ShapeGuardError
impl Send for ShapeGuardError
impl Sync for ShapeGuardError
impl Unpin for ShapeGuardError
impl UnsafeUnpin for ShapeGuardError
impl !UnwindSafe for ShapeGuardError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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