pub enum MetadataGenerateOp {
IotaStartZero,
Constant(MetadataConstantValue),
}Expand description
Metadata tensor generation operations.
Generation is intentionally separate from pointwise metadata ops so the
contract can describe iota-style and constant metadata tensors without
requiring a dummy input tensor.
§Examples
use tenferro_prims::{MetadataConstantValue, MetadataGenerateOp};
let op = MetadataGenerateOp::IotaStartZero;
assert!(matches!(op, MetadataGenerateOp::IotaStartZero));
let constant = MetadataGenerateOp::Constant(MetadataConstantValue::Bool(true));
assert!(matches!(
constant,
MetadataGenerateOp::Constant(MetadataConstantValue::Bool(true))
));Variants§
IotaStartZero
Generate a zero-based iota/arange tensor.
Constant(MetadataConstantValue)
Generate a tensor filled with a constant payload.
Trait Implementations§
Source§impl Clone for MetadataGenerateOp
impl Clone for MetadataGenerateOp
Source§fn clone(&self) -> MetadataGenerateOp
fn clone(&self) -> MetadataGenerateOp
Returns a duplicate of the value. Read more
1.0.0 · 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 MetadataGenerateOp
impl Debug for MetadataGenerateOp
Source§impl Hash for MetadataGenerateOp
impl Hash for MetadataGenerateOp
Source§impl PartialEq for MetadataGenerateOp
impl PartialEq for MetadataGenerateOp
impl Copy for MetadataGenerateOp
impl Eq for MetadataGenerateOp
impl StructuralPartialEq for MetadataGenerateOp
Auto Trait Implementations§
impl Freeze for MetadataGenerateOp
impl RefUnwindSafe for MetadataGenerateOp
impl Send for MetadataGenerateOp
impl Sync for MetadataGenerateOp
impl Unpin for MetadataGenerateOp
impl UnwindSafe for MetadataGenerateOp
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,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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