pub struct ApiComparisonProfile { /* private fields */ }Expand description
Deterministic projection and explanation policy for the current comparator.
Implementations§
Source§impl ApiComparisonProfile
impl ApiComparisonProfile
Sourcepub fn new(
selected_paths: Vec<JsonPathPattern>,
ignored_paths: Vec<JsonPathPattern>,
unordered_arrays: Vec<JsonPathPattern>,
max_diff_paths: u16,
) -> Result<Self, ProfiledApiVisibilityError>
pub fn new( selected_paths: Vec<JsonPathPattern>, ignored_paths: Vec<JsonPathPattern>, unordered_arrays: Vec<JsonPathPattern>, max_diff_paths: u16, ) -> Result<Self, ProfiledApiVisibilityError>
Creates a validated current-version profile.
Empty selected_paths means the complete document. Patterns are sorted
and deduplicated before the policy ID is calculated. Ignore rules take
precedence over selection rules.
Sourcepub const fn algorithm_version(&self) -> ComparisonAlgorithmVersion
pub const fn algorithm_version(&self) -> ComparisonAlgorithmVersion
Returns the deterministic comparison algorithm version.
Sourcepub fn selected_paths(&self) -> &[JsonPathPattern]
pub fn selected_paths(&self) -> &[JsonPathPattern]
Returns the selected subtree patterns; an empty slice selects all.
Sourcepub fn ignored_paths(&self) -> &[JsonPathPattern]
pub fn ignored_paths(&self) -> &[JsonPathPattern]
Returns the ignored subtree patterns.
Sourcepub fn unordered_arrays(&self) -> &[JsonPathPattern]
pub fn unordered_arrays(&self) -> &[JsonPathPattern]
Returns array paths whose element order is semantically irrelevant.
Sourcepub const fn max_diff_paths(&self) -> u16
pub const fn max_diff_paths(&self) -> u16
Returns the combined explanation-path limit.
Sourcepub const fn projection_policy_id(&self) -> ProjectionPolicyId
pub const fn projection_policy_id(&self) -> ProjectionPolicyId
Returns the stable digest of this complete projection policy.
Trait Implementations§
Source§impl Clone for ApiComparisonProfile
impl Clone for ApiComparisonProfile
Source§fn clone(&self) -> ApiComparisonProfile
fn clone(&self) -> ApiComparisonProfile
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 ApiComparisonProfile
impl Debug for ApiComparisonProfile
Source§impl Default for ApiComparisonProfile
impl Default for ApiComparisonProfile
Source§impl<'de> Deserialize<'de> for ApiComparisonProfile
impl<'de> Deserialize<'de> for ApiComparisonProfile
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
impl Eq for ApiComparisonProfile
Source§impl PartialEq for ApiComparisonProfile
impl PartialEq for ApiComparisonProfile
Source§impl Serialize for ApiComparisonProfile
impl Serialize for ApiComparisonProfile
impl StructuralPartialEq for ApiComparisonProfile
Auto Trait Implementations§
impl Freeze for ApiComparisonProfile
impl RefUnwindSafe for ApiComparisonProfile
impl Send for ApiComparisonProfile
impl Sync for ApiComparisonProfile
impl Unpin for ApiComparisonProfile
impl UnsafeUnpin for ApiComparisonProfile
impl UnwindSafe for ApiComparisonProfile
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more