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

   > ```rust
   > fn fory_type_id_dyn(&self, fory: &Fory) -> u32 {
   >         Self::fory_get_type_id(fory)
   >     }
   > ```
   > 
   > can be made as default impl in `Serializer` trait to make ext type impl 
more convenient
   
   No, it must implement as 
   ```rust
   fn fory_type_id_dyn(&self, fory: &Fory) -> u32 where Self: Sized {
       Self::fory_get_type_id(fory)
   }
   ```
   Because: 
   <img width="641" height="245" alt="image" 
src="https://github.com/user-attachments/assets/9d66765f-bcaf-4680-b61e-ba2ca7b40a37";
 />
   
   And after doing so, the \<dyn Serializer\>will have some error. 
   <img width="805" height="493" alt="image" 
src="https://github.com/user-attachments/assets/bf35514e-278a-480a-ba9c-fef47da467a3";
 />
   


-- 
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