pub struct CoercionSpec {
pub forward: Expr,
pub inverse: Option<Expr>,
pub class: CoercionClass,
}Expand description
Specification of a coercion between two value kinds.
Contains the forward coercion expression, an optional inverse for round-tripping, and the coercion class classifying the round-trip behavior.
Fields§
§forward: ExprForward coercion expression (source to target).
inverse: Option<Expr>Inverse coercion expression (target to source) for the put direction.
class: CoercionClassRound-trip classification.
Trait Implementations§
Source§impl Clone for CoercionSpec
impl Clone for CoercionSpec
Source§fn clone(&self) -> CoercionSpec
fn clone(&self) -> CoercionSpec
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 CoercionSpec
impl Debug for CoercionSpec
Source§impl<'de> Deserialize<'de> for CoercionSpec
impl<'de> Deserialize<'de> for CoercionSpec
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
Source§impl PartialEq for CoercionSpec
impl PartialEq for CoercionSpec
Source§impl Serialize for CoercionSpec
impl Serialize for CoercionSpec
impl Eq for CoercionSpec
impl StructuralPartialEq for CoercionSpec
Auto Trait Implementations§
impl Freeze for CoercionSpec
impl RefUnwindSafe for CoercionSpec
impl Send for CoercionSpec
impl Sync for CoercionSpec
impl Unpin for CoercionSpec
impl UnsafeUnpin for CoercionSpec
impl UnwindSafe for CoercionSpec
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