(&self, cursor: Ident)
| 55 | } |
| 56 | |
| 57 | pub fn to_atom(&self, cursor: Ident) -> TokenStream { |
| 58 | let atom_set = self.first_segment(); |
| 59 | quote! { p.to_atom::<#atom_set>(#cursor) } |
| 60 | } |
| 61 | |
| 62 | pub fn first_segment(&self) -> Ident { |
| 63 | self.0.path.segments.first().expect("atom path must have at least one segment").ident.clone() |