{"action":"created","issue":{"url":"https://api.github.com/repos/gotham-rs/gotham/issues/175","repository_url":"https://api.github.com/repos/gotham-rs/gotham","labels_url":"https://api.github.com/repos/gotham-rs/gotham/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/gotham-rs/gotham/issues/175/comments","events_url":"https://api.github.com/repos/gotham-rs/gotham/issues/175/events","html_url":"https://github.com/gotham-rs/gotham/issues/175","id":302509146,"number":175,"title":"Store glob match in state","user":{"login":"bradleybeddoes","id":86558,"avatar_url":"https://avatars0.githubusercontent.com/u/86558?v=4","gravatar_id":"","url":"https://api.github.com/users/bradleybeddoes","html_url":"https://github.com/bradleybeddoes","followers_url":"https://api.github.com/users/bradleybeddoes/followers","following_url":"https://api.github.com/users/bradleybeddoes/following{/other_user}","gists_url":"https://api.github.com/users/bradleybeddoes/gists{/gist_id}","starred_url":"https://api.github.com/users/bradleybeddoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradleybeddoes/subscriptions","organizations_url":"https://api.github.com/users/bradleybeddoes/orgs","repos_url":"https://api.github.com/users/bradleybeddoes/repos","events_url":"https://api.github.com/users/bradleybeddoes/events{/privacy}","received_events_url":"https://api.github.com/users/bradleybeddoes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-05T23:48:00Z","updated_at":"2018-03-12T03:16:40Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When using globs in routes and extracting path components store the component of the path which matched on the glob within the PathExtractor. Stored value will be a Vec of ordered path segments.\r\n\r\nThis will require an example showing how to do the Serde integration."},"comment":{"url":"https://api.github.com/repos/gotham-rs/gotham/issues/comments/372183075","html_url":"https://github.com/gotham-rs/gotham/issues/175#issuecomment-372183075","issue_url":"https://api.github.com/repos/gotham-rs/gotham/issues/175","id":372183075,"user":{"login":"smangelsdorf","id":6358,"avatar_url":"https://avatars1.githubusercontent.com/u/6358?v=4","gravatar_id":"","url":"https://api.github.com/users/smangelsdorf","html_url":"https://github.com/smangelsdorf","followers_url":"https://api.github.com/users/smangelsdorf/followers","following_url":"https://api.github.com/users/smangelsdorf/following{/other_user}","gists_url":"https://api.github.com/users/smangelsdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/smangelsdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smangelsdorf/subscriptions","organizations_url":"https://api.github.com/users/smangelsdorf/orgs","repos_url":"https://api.github.com/users/smangelsdorf/repos","events_url":"https://api.github.com/users/smangelsdorf/events{/privacy}","received_events_url":"https://api.github.com/users/smangelsdorf/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T03:16:40Z","updated_at":"2018-03-12T03:16:40Z","author_association":"CONTRIBUTOR","body":"@illicitonion I spoke to @bradleybeddoes about this the other day, and we came up with the idea to restrict globs to only be in the tail position. It was originally implemented to be as generic as possible, but starts to sound less appealing when considering ambiguities like you've pointed out here. The router builder will need to reject non-conformant routes if we document restrictions on where globs can be used. We can probably leave the tree implementation as-is.\r\n\r\nOne positive of that idea is that only a single glob can exist for a route. The obvious downside – the loss of flexibility – is something we could worry about in the future when the need arises.\r\n\r\nThe idea I had at the time was to use `*` for the name of the field, forcing apps to give them a meaningful name like:\r\n\r\n```rust\r\n#[derive(Deserialize, StateData, StaticResponseExtender)]\r\nstruct MyPathParams {\r\n    #[serde(rename = \"*\")]\r\n    parts: Vec<String>,\r\n}\r\n```\r\n\r\nI'm open to opinions though.\r\n\r\n@bradleybeddoes Have you had any more thoughts on the tail position glob restriction since we last spoke about it?"}}
{"actor":{"display_login":"smangelsdorf"}}