MCPcopy Create free account
hub / github.com/apache/fory / codec_call

Method codec_call

rust/fory-derive/src/object/field_codec.rs:51–61  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

49impl<'a> ResolvedField<'a> {
50 #[inline]
51 pub fn codec_call(&self) -> TokenStream {
52 match &self.dispatch {
53 FieldDispatch::Codec { codec_ty } => {
54 let value_ty = self.value_ty;
55 quote! { <#codec_ty as fory_core::serializer::codec::Codec<#value_ty>> }
56 }
57 FieldDispatch::Serializer { .. } => {
58 quote! { compile_error!("serializer-dispatched field has no codec call") }
59 }
60 }
61 }
62
63 pub fn reserved_space(&self) -> TokenStream {
64 match &self.dispatch {

Callers 8

reserved_spaceMethod · 0.80
write_value_fieldMethod · 0.80
write_value_with_modeMethod · 0.80
read_fieldMethod · 0.80
read_with_mode_exprMethod · 0.80
field_infoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected