mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-10 08:47:58 +00:00
Shared params in CLI API (#4466)
* Common shared parames getter * Expose more types from `service-builder` Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
bfad5f3ffc
commit
9950ea98fc
@@ -15,6 +15,7 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use structopt::{StructOpt, clap::App};
|
||||
use crate::params::SharedParams;
|
||||
|
||||
/// Something that can augment a clap app with further parameters.
|
||||
/// `derive(StructOpt)` is implementing this function by default, so a macro `impl_augment_clap!`
|
||||
@@ -37,8 +38,8 @@ macro_rules! impl_augment_clap {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the log filter given by the user as commandline argument.
|
||||
pub trait GetLogFilter {
|
||||
/// Returns the set log filter.
|
||||
fn get_log_filter(&self) -> Option<String>;
|
||||
/// Supports getting common params.
|
||||
pub trait GetSharedParams {
|
||||
/// Returns shared params if any.
|
||||
fn shared_params(&self) -> Option<&SharedParams>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user