mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 13:37:57 +00:00
Allow lossless matching for Origin (#8576)
* Allow lossless matching for Origin Without these changes, it's difficult/impossible to not lose any filters when making fine-grained matches against origin. * whilespace * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -76,6 +76,12 @@ pub trait OriginTrait: Sized {
|
||||
/// Get the caller.
|
||||
fn caller(&self) -> &Self::PalletsOrigin;
|
||||
|
||||
/// Do something with the caller, consuming self but returning it if the caller was unused.
|
||||
fn try_with_caller<R>(
|
||||
self,
|
||||
f: impl FnOnce(Self::PalletsOrigin) -> Result<R, Self::PalletsOrigin>,
|
||||
) -> Result<R, Self>;
|
||||
|
||||
/// Create with system none origin and `frame-system::Config::BaseCallFilter`.
|
||||
fn none() -> Self;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user