MCPcopy Create free account
hub / github.com/biblius/validify / option_self_tokens_modifications

Method option_self_tokens_modifications

validify_derive/src/fields.rs:374–384  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

372 }
373
374 fn option_self_tokens_modifications(&self) -> proc_macro2::TokenStream {
375 let ident = &self.field.ident;
376 let mut tokens = quote!(#ident);
377 let mut ty = &self.field.ty;
378
379 while let Some(typ) = try_extract_option(ty) {
380 tokens = quote!(Some(#tokens));
381 ty = typ;
382 }
383 tokens
384 }
385}
386
387/// Check whether the attribute belongs to validify, i.e. is it

Callers 1

Calls 1

try_extract_optionFunction · 0.85

Tested by

no test coverage detected