pub struct FieldPattern {
pub path: String,
pub source: RealitySource,
pub priority: i32,
}Expand description
Field pattern for matching JSON paths
Fields§
§path: StringJSON path pattern (e.g., “id”, “email”, “.currency”, “user.pii.”)
source: RealitySourceReality source to use for matching fields
priority: i32Optional priority (higher = more specific, checked first)
Implementations§
Source§impl FieldPattern
impl FieldPattern
Sourcepub fn matches(&self, json_path: &str) -> bool
pub fn matches(&self, json_path: &str) -> bool
Check if a JSON path matches this pattern
Supports:
- Exact match: “id” matches “id”
- Wildcard suffix: “*.currency” matches “user.currency”, “order.currency”
- Wildcard prefix: “user.*” matches “user.id”, “user.email”
- Full wildcard: “*” matches everything
Trait Implementations§
Source§impl Clone for FieldPattern
impl Clone for FieldPattern
Source§fn clone(&self) -> FieldPattern
fn clone(&self) -> FieldPattern
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 FieldPattern
impl Debug for FieldPattern
Source§impl<'de> Deserialize<'de> for FieldPattern
impl<'de> Deserialize<'de> for FieldPattern
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 FieldPattern
impl RefUnwindSafe for FieldPattern
impl Send for FieldPattern
impl Sync for FieldPattern
impl Unpin for FieldPattern
impl UnsafeUnpin for FieldPattern
impl UnwindSafe for FieldPattern
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