Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
Description
Feature gate: #![feature(error_generic_member_access)]
This is a tracking issue for the generic member access API on the error trait, which generalizes the pattern of fn source(&self) -> Option<&dyn Error> and fn backtrace(&self) -> Option<&Backtrace> into fn request_ref::<T>(&self) -> Option<&T>
Public API
// std::errorpubtraitError:Debug + Display{// existing API unchangedfnprovide<'a>(&'aself,req:&mutRequest<'a>){}}pubstructRequest<'a>{ .. }impl<'a>Request<'a>{pubfnprovide_value<T>(&mutself,value:T) -> &mutRequest<'a>whereT:'static;pubfnprovide_value_with<T>(&mutself,fulfil:implFnOnce() -> T,) -> &mutRequest<'a>whereT:'static;pubfnprovide_ref<T>(&mutself,value:&'aT) -> &mutRequest<'a>whereT:'static + ?Sized;pubfnprovide_ref_with<T>(&mutself,fulfil:implFnOnce() -> &'aT,) -> &mutRequest<'a>whereT:'static + ?Sized;pubfnwould_be_satisfied_by_value_of<T>(&self) -> boolwhereT:'static;pubfnwould_be_satisfied_by_ref_of<T>(&self) -> boolwhereT:'static + ?Sized;}pubfnrequest_ref<'a,T: ?Sized + 'static>(err:&'a(implError + ?Sized)) -> Option<&'aT>;pubfnrequest_value<T:'static>(err:&(implError + ?Sized)) -> Option<T>;Steps / History
Now tracked by @waynr in #99301 (comment)
Unresolved Questions
- None yet.
stepancheg, tgross35, thebluetropics, jess-sol, schneiderfelipe and 13 morerobsdedude, adriandelgado, artob, chamons and joseluis
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.