pub fn update_ref_struct_field(self, field_num: usize, field_val: TypedValue) -> TypedValue {
        let (field_ty, field_val, _) = field_val.decompose();
        let (struct_ty, struct_val, struct_ptr) = self.decompose();
        let inst = struct_ty.into_ref_struct_inst(Some(true));
        if cfg!(debug_assertions) {
            assert!(field_ty.is_ref_of(&inst.fields.get(field_num).unwrap().ty, Some(true)));
        }
        let mut fields = struct_val.into_struct();
        *fields.get_mut(field_num).unwrap() = field_val;
        TypedValue {
            ty: Type::mk_ref_struct(inst, true),
            val: BaseValue::mk_struct(fields),
            ptr: struct_ptr,
        }
    }
/// update one specific field from a struct reference, create a new struct reference
update one specific field from a struct reference, create a new struct reference
update one specific field from a struct reference create a new struct reference
pub fn update_ref_struct_field(self, field_num: usize, field_val: TypedValue) -> TypedValue {
        let (field_ty, field_val, _) = field_val.decompose();
        let (struct_ty, struct_val, struct_ptr) = self.decompose();
        let inst = struct_ty.into_ref_struct_inst(Some(true));
        if cfg!(debug_assertions) {
            assert!(field_ty.is_ref_of(&inst.fields.get(field_num).unwrap().ty, Some(true)));
        }
        let mut fields = struct_val.into_struct();
        *fields.get_mut(field_num).unwrap() = field_val;
        TypedValue {
            ty: Type::mk_ref_struct(inst, true),
            val: BaseValue::mk_struct(fields),
            ptr: struct_ptr,
        }
    }
pub fn update_ref_struct_field ( self , field_num : usize , field_val : TypedValue ) -> TypedValue { let ( field_ty , field_val , _ ) = field_val . decompose ( ) ; let ( struct_ty , struct_val , struct_ptr ) = self . decompose ( ) ; let inst = struct_ty . into_ref_struct_inst ( Some ( true ) ) ; if cfg ! ( debug_assertions ) { assert ! ( field_ty is_ref_of ( inst fields get ( field_num ) unwrap ( ) ty Some ( true ) ) ) ; } let mut fields = struct_val . into_struct ( ) ; * fields . get_mut ( field_num ) . unwrap ( ) = field_val ; TypedValue { ty : Type :: mk_ref_struct ( inst , true ) , val : BaseValue :: mk_struct ( fields ) , ptr : struct_ptr , } }
update one specific field from a struct reference, create a new struct reference
update one specific field from a struct reference create a new struct reference
self
field_num
usize
field_val
TypedValue