urlyy commented on PR #2712:
URL: https://github.com/apache/fory/pull/2712#issuecomment-3376675954

   ```rust
   #[derive(Debug, PartialEq, Default)]
   struct ExtItem {
       id: i32,
   }
   impl ForyDefault for ExtItem {
       fn fory_default() -> Self {
           Self::default()
       }
   }
   impl Serializer for ExtItem {
       fn fory_write_data(&self, context: &mut WriteContext, is_field: bool) {
           write_data(&self.id, context, is_field);
       }
       fn fory_read_data(context: &mut ReadContext, is_field: bool) -> 
Result<Self, Error> {
           Ok(Self {
               id: read_data(context, is_field)?,
           })
       }
       
       fn fory_type_id_dyn(&self, fory: &Fory) -> u32 {
           Self::fory_get_type_id(fory)
       }
       
       fn as_any(&self) -> &dyn std::any::Any {
           self
       }
   }
   ```
   A bit inconvenient for users, isn't it?
   @chaokunyang 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to