Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 73 fields pub config_file: Option<String>, pub genesis_file: Option<String>, pub network_id: u32, pub db_type: String, pub db_dir: String, pub chain_data_dir: String, pub log_dir: String, pub log_level: Option<String>, pub log_format: Option<String>, pub log_display_level: Option<String>, pub http_port: u32, pub http_host: Option<String>, pub http_tls_enabled: Option<bool>, pub http_tls_key_file: Option<String>, pub http_tls_cert_file: Option<String>, pub public_ip: Option<String>, pub sybil_protection_enabled: Option<bool>, pub staking_port: u32, pub staking_tls_key_file: Option<String>, pub staking_tls_cert_file: Option<String>, pub staking_signer_key_file: Option<String>, pub bootstrap_ips: Option<String>, pub bootstrap_ids: Option<String>, pub snow_sample_size: Option<u32>, pub snow_quorum_size: Option<u32>, pub snow_concurrent_repolls: Option<u32>, pub snow_max_time_processing: Option<String>, pub snow_rogue_commit_threshold: Option<u32>, pub snow_virtuous_commit_threshold: Option<u32>, pub network_peer_list_gossip_frequency: Option<String>, pub network_max_reconnect_delay: Option<String>, pub index_enabled: Option<bool>, pub index_allow_incomplete: Option<bool>, pub api_admin_enabled: Option<bool>, pub api_info_enabled: Option<bool>, pub api_keystore_enabled: Option<bool>, pub api_metrics_enabled: Option<bool>, pub api_health_enabled: Option<bool>, pub api_ipcs_enabled: Option<bool>, pub track_subnets: Option<String>, pub plugin_dir: String, pub subnet_config_dir: String, pub chain_config_dir: String, pub state_sync_ids: Option<String>, pub state_sync_ips: Option<String>, pub profile_dir: Option<String>, pub profile_continuous_enabled: Option<bool>, pub profile_continuous_freq: Option<String>, pub profile_continuous_max_files: Option<u32>, pub proposervm_use_current_height: Option<bool>, pub throttler_inbound_node_max_processing_msgs: Option<u64>, pub throttler_inbound_bandwidth_refill_rate: Option<u64>, pub throttler_inbound_bandwidth_max_burst_size: Option<u64>, pub throttler_inbound_cpu_validator_alloc: Option<u64>, pub throttler_inbound_disk_validator_alloc: Option<u64>, pub throttler_inbound_at_large_alloc_size: Option<u64>, pub throttler_inbound_validator_alloc_size: Option<u64>, pub throttler_inbound_node_max_at_large_bytes: Option<u64>, pub snow_mixed_query_num_push_vdr: Option<u64>, pub consensus_accepted_frontier_gossip_frequency: Option<i64>, pub consensus_app_concurrency: Option<i64>, pub consensus_on_accept_gossip_validator_size: Option<u64>, pub consensus_on_accept_gossip_non_validator_size: Option<u64>, pub consensus_on_accept_gossip_peer_size: Option<u64>, pub consensus_accepted_frontier_gossip_peer_size: Option<u64>, pub throttler_outbound_at_large_alloc_size: Option<u64>, pub throttler_outbound_validator_alloc_size: Option<u64>, pub throttler_outbound_node_max_at_large_bytes: Option<u64>, pub network_minimum_timeout: Option<String>, pub network_require_validator_to_connect: Option<bool>, pub network_compression_type: Option<String>, pub tracing_enabled: Option<bool>, pub process_context_file: Option<String>,
}
Available on crate feature avalanchego only.
Expand description

Represents AvalancheGo configuration. All file paths must be valid on the remote machines. For example, you may configure cert paths on your local laptop but the actual Avalanche nodes run on the remote machines so the paths will be invalid. ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/config ref. https://github.com/ava-labs/avalanchego/blob/v1.9.8/config/flags.go ref. https://github.com/ava-labs/avalanchego/blob/v1.9.8/config/keys.go ref. https://serde.rs/container-attrs.html

Fields§

§config_file: Option<String>

File path to persist all fields below.

§genesis_file: Option<String>

Genesis file path. MUST BE NON-EMPTY for custom network.

§network_id: u32

Network ID. Default to custom network ID. Set it to 1 for mainnet. e.g., “mainnet” is 1, “fuji” is 5, “local” is 12345. “utils/constants/NetworkID” only accepts string for known networks. ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/utils/constants#pkg-constants ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/utils/constants#NetworkName

§db_type: String§db_dir: String

Database directory, must be a valid path in remote host machine.

§chain_data_dir: String

Chain data directory, must be a valid path in remote host machine.

§log_dir: String

Logging directory, must be a valid path in remote host machine.

§log_level: Option<String>

“avalanchego” logging level. See “utils/logging/level.go”. e.g., “INFO”, “FATAL”, “DEBUG”, “VERBO”, etc..

§log_format: Option<String>

“avalanchego” logging format. e.g., “json”, etc..

§log_display_level: Option<String>§http_port: u32

HTTP port.

§http_host: Option<String>

HTTP host, which avalanchego defaults to 127.0.0.1. Set it to 0.0.0.0 to expose the HTTP API to all incoming traffic.

§http_tls_enabled: Option<bool>§http_tls_key_file: Option<String>

MUST BE a valid path in remote host machine.

§http_tls_cert_file: Option<String>

MUST BE a valid path in remote host machine.

§public_ip: Option<String>

Public IP of this node for P2P communication. If empty, try to discover with NAT.

§sybil_protection_enabled: Option<bool>§staking_port: u32

Staking port.

§staking_tls_key_file: Option<String>

MUST BE a valid path in remote host machine.

§staking_tls_cert_file: Option<String>

MUST BE a valid path in remote host machine.

§staking_signer_key_file: Option<String>

MUST BE a valid path in remote host machine. Path to the BLS key.

§bootstrap_ips: Option<String>§bootstrap_ids: Option<String>§snow_sample_size: Option<u32>

The sample size k, snowball.Parameters.K. If zero, use the default value set via avalanche node code.

§snow_quorum_size: Option<u32>

The quorum size α, snowball.Parameters.Alpha. If zero, use the default value set via avalanche node code.

§snow_concurrent_repolls: Option<u32>§snow_max_time_processing: Option<String>§snow_rogue_commit_threshold: Option<u32>§snow_virtuous_commit_threshold: Option<u32>§network_peer_list_gossip_frequency: Option<String>§network_max_reconnect_delay: Option<String>§index_enabled: Option<bool>§index_allow_incomplete: Option<bool>§api_admin_enabled: Option<bool>§api_info_enabled: Option<bool>§api_keystore_enabled: Option<bool>§api_metrics_enabled: Option<bool>§api_health_enabled: Option<bool>§api_ipcs_enabled: Option<bool>§track_subnets: Option<String>

A list of whitelisted/tracked subnet IDs (comma-separated). From avalanchego v1.9.7, it’s renamed to “track-subnets”. ref. https://github.com/ava-labs/avalanchego/blob/v1.9.8/config/keys.go

§plugin_dir: String

Plugin directory. Default to “/data/avalanche-plugins”.

§subnet_config_dir: String

Subnet configuration directory (e.g., /data/avalanche-configs/subnets/C.json). If a subnet id is 2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt, the config file for this subnet is located at {subnet-config-dir}/2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt.json.

§chain_config_dir: String

Chain configuration directory (e.g., /data/avalanche-configs/chains/C/config.json). If a Subnet’s chain id is 2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt, the config file for this chain is located at {chain-config-dir}/2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt/config.json.

§state_sync_ids: Option<String>

A comma separated string of explicit nodeID and IPs to contact for starting state sync. Useful for testing. NOTE: Actual state data will be downloaded from nodes specified in the C-Chain config, or the entire network if no list specified there.

§state_sync_ips: Option<String>§profile_dir: Option<String>

Continuous profile flags

§profile_continuous_enabled: Option<bool>§profile_continuous_freq: Option<String>§profile_continuous_max_files: Option<u32>§proposervm_use_current_height: Option<bool>§throttler_inbound_node_max_processing_msgs: Option<u64>§throttler_inbound_bandwidth_refill_rate: Option<u64>§throttler_inbound_bandwidth_max_burst_size: Option<u64>§throttler_inbound_cpu_validator_alloc: Option<u64>§throttler_inbound_disk_validator_alloc: Option<u64>§throttler_inbound_at_large_alloc_size: Option<u64>§throttler_inbound_validator_alloc_size: Option<u64>§throttler_inbound_node_max_at_large_bytes: Option<u64>§snow_mixed_query_num_push_vdr: Option<u64>§consensus_accepted_frontier_gossip_frequency: Option<i64>§consensus_app_concurrency: Option<i64>§consensus_on_accept_gossip_validator_size: Option<u64>§consensus_on_accept_gossip_non_validator_size: Option<u64>§consensus_on_accept_gossip_peer_size: Option<u64>§consensus_accepted_frontier_gossip_peer_size: Option<u64>§throttler_outbound_at_large_alloc_size: Option<u64>§throttler_outbound_validator_alloc_size: Option<u64>§throttler_outbound_node_max_at_large_bytes: Option<u64>§network_minimum_timeout: Option<String>§network_require_validator_to_connect: Option<bool>§network_compression_type: Option<String>§tracing_enabled: Option<bool>§process_context_file: Option<String>

Implementations§

Source§

impl Config

Source

pub fn default_main() -> Self

The defaults do not match with the ones in avalanchego, as this is for avalanche-ops based deployments.

Source

pub fn default_fuji() -> Self

The defaults do not match with the ones in avalanchego, as this is for avalanche-ops based deployments.

Source

pub fn default_custom() -> Self

The defaults do not match with the ones in avalanchego, as this is for avalanche-ops based deployments.

Source

pub fn is_mainnet(&self) -> bool

Returns true if the configuration is mainnet.

Source

pub fn is_custom_network(&self) -> bool

Returns true if the configuration is a custom network thus requires a custom genesis file.

Source

pub fn add_track_subnets(&mut self, ids: Option<String>)

Source

pub fn encode_json(&self) -> Result<String>

Converts to string with JSON encoder.

Source

pub fn sync(&self, file_path: Option<String>) -> Result<()>

Saves the current configuration to disk and overwrites the file.

Source

pub fn load(file_path: &str) -> Result<Self>

Source

pub fn validate(&self) -> Result<()>

Validates the configuration.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Config

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Config

Source§

impl PartialEq for Config

Source§

fn eq(&self, other: &Config) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Config

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Config

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> JsonSchemaMaybe for T

Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more