Stream: general

Topic: syn::Path


gnzlbg (Sep 15 2019 at 07:54, on Zulip):

I'm parsing a Option<&u8> as a syn::Type, and this produces a syn::Type::Path. I want to split the Option as an identifier, and iterate over its generic parameters, but I don't see any type that allows me to do that.

gnzlbg (Sep 15 2019 at 07:55, on Zulip):

What's the idiomatic way ?

gnzlbg (Sep 15 2019 at 08:33, on Zulip):

Ah the Path has only one PathSegment, but PathSegments can have PathArguments, so that's how.

Last update: Nov 20 2019 at 13:40UTC