pub struct MetamorphicRelation {
pub id: String,
pub description: String,
pub source_transform: String,
pub expected_relation: String,
pub tolerance: f64,
}Expand description
A metamorphic relation for testing without oracles.
Per Chen et al. (2018): Metamorphic relations verify invariants without requiring knowledge of the correct output.
Fields§
§id: StringUnique relation ID (e.g., “MR-PermutationInvariance”).
description: StringHuman-readable description.
source_transform: StringTransform to apply to source input.
expected_relation: StringExpected relation between source and follow-up outputs.
tolerance: f64Tolerance for numerical comparisons.
Trait Implementations§
Source§impl Clone for MetamorphicRelation
impl Clone for MetamorphicRelation
Source§fn clone(&self) -> MetamorphicRelation
fn clone(&self) -> MetamorphicRelation
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 MetamorphicRelation
impl Debug for MetamorphicRelation
Source§impl<'de> Deserialize<'de> for MetamorphicRelation
impl<'de> Deserialize<'de> for MetamorphicRelation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MetamorphicRelation
impl RefUnwindSafe for MetamorphicRelation
impl Send for MetamorphicRelation
impl Sync for MetamorphicRelation
impl Unpin for MetamorphicRelation
impl UnsafeUnpin for MetamorphicRelation
impl UnwindSafe for MetamorphicRelation
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