pub enum CoercionDecision {
Denied,
Allowed {
exact: bool,
check: CheckPolicy,
materialization: MaterializationPolicy,
},
}Expand description
Coercion decision returned by the normalized compatibility table.
Variants§
Denied
Source and destination are incompatible.
Allowed
Source and destination are compatible.
Fields
§
check: CheckPolicyRuntime check requirement for this coercion.
§
materialization: MaterializationPolicyMaterialization requirement for this coercion.
Implementations§
Source§impl CoercionDecision
impl CoercionDecision
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Return whether this coercion is accepted.
Sourcepub fn requires_runtime_check(&self) -> bool
pub fn requires_runtime_check(&self) -> bool
Return whether this coercion requires a runtime check.
Sourcepub fn requires_materialization(&self) -> bool
pub fn requires_materialization(&self) -> bool
Return whether this coercion requires representation materialization.
Trait Implementations§
Source§impl Clone for CoercionDecision
impl Clone for CoercionDecision
Source§fn clone(&self) -> CoercionDecision
fn clone(&self) -> CoercionDecision
Returns a copy 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 CoercionDecision
impl Debug for CoercionDecision
Source§impl PartialEq for CoercionDecision
impl PartialEq for CoercionDecision
impl Eq for CoercionDecision
impl StructuralPartialEq for CoercionDecision
Auto Trait Implementations§
impl Freeze for CoercionDecision
impl RefUnwindSafe for CoercionDecision
impl Send for CoercionDecision
impl Sync for CoercionDecision
impl Unpin for CoercionDecision
impl UnwindSafe for CoercionDecision
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