Returns `self.#ident`, unless the field is an option in which case it just returns an `#ident` as we always do a `if let` check on Option fields
(&self)
| 165 | /// Returns `self.#ident`, unless the field is an option in which case it just |
| 166 | /// returns an `#ident` as we always do a `if let` check on Option fields |
| 167 | pub fn quote_modifier_param(&self) -> proc_macro2::TokenStream { |
| 168 | let ident = &self.field.ident; |
| 169 | |
| 170 | if self.is_reference() { |
| 171 | abort!( |
| 172 | ident.span(), |
| 173 | "Fields containing modifiers must contain owned data" |
| 174 | ) |
| 175 | } |
| 176 | |
| 177 | if self.is_option() { |
| 178 | quote!(#ident) |
| 179 | } else { |
| 180 | quote!(self.#ident) |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | /// Returns either |
| 185 | /// |
no test coverage detected