(elem: &T, context: &mut WriteContext)
| 88 | /// This handles the different serialization strategies for various element types. |
| 89 | #[inline(always)] |
| 90 | fn write_tuple_element<T: Serializer>(elem: &T, context: &mut WriteContext) -> Result<(), Error> { |
| 91 | if T::fory_is_option() || T::fory_is_shared_ref() || T::fory_static_type_id() == TypeId::UNKNOWN |
| 92 | { |
| 93 | // For Option, shared references, or unknown static types, use full write with ref tracking |
| 94 | let ref_mode = if T::fory_is_shared_ref() { |
| 95 | RefMode::Tracking |
| 96 | } else { |
| 97 | RefMode::NullOnly |
| 98 | }; |
| 99 | elem.fory_write(context, ref_mode, false, false) |
| 100 | } else { |
| 101 | // For concrete types with known static type IDs, directly write data |
| 102 | elem.fory_write_data(context) |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /// Helper function to read a tuple element based on its type characteristics. |
| 107 | #[inline(always)] |
no test coverage detected