pub struct TypePolicy {
pub on_lossy_mapping: PolicyAction,
pub on_unsupported_type: PolicyAction,
}Expand description
Per-export type-safety policy (roadmap §7).
The default is strict — both lossy and unsupported mappings fail.
--no-strict / future config can relax individual axes.
Fields§
§on_lossy_mapping: PolicyActionAction when a column mapping is TypeFidelity::Lossy.
on_unsupported_type: PolicyActionAction when a column mapping is TypeFidelity::Unsupported.
Implementations§
Source§impl TypePolicy
impl TypePolicy
Source§impl TypePolicy
impl TypePolicy
Sourcepub fn validate(&self, mappings: &[TypeMapping]) -> Vec<PolicyViolation>
pub fn validate(&self, mappings: &[TypeMapping]) -> Vec<PolicyViolation>
Validate mappings and return all violations (both warn and fail).
Sourcepub fn check_fail(&self, violations: &[PolicyViolation]) -> Result<()>
pub fn check_fail(&self, violations: &[PolicyViolation]) -> Result<()>
Return Err when any fatal violation exists, otherwise Ok(()).
Trait Implementations§
Source§impl Clone for TypePolicy
impl Clone for TypePolicy
Source§fn clone(&self) -> TypePolicy
fn clone(&self) -> TypePolicy
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 TypePolicy
impl Debug for TypePolicy
Auto Trait Implementations§
impl Freeze for TypePolicy
impl RefUnwindSafe for TypePolicy
impl Send for TypePolicy
impl Sync for TypePolicy
impl Unpin for TypePolicy
impl UnsafeUnpin for TypePolicy
impl UnwindSafe for TypePolicy
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