pub struct SpawnParams {
Show 27 fields alias: NodeAlias, bootstrap_from_peers: Option<bool>, faketime: Option<FaketimeConfig>, gossip_interval: Option<Duration>, jormungandr: Option<PathBuf>, leadership_mode: LeadershipMode, listen_address: Option<Option<SocketAddr>>, log_level: Option<LogLevel>, max_bootstrap_attempts: Option<usize>, max_connections: Option<u32>, allow_private_addresses: Option<bool>, whitelist: Option<Vec<Multiaddr>>, max_inbound_connections: Option<u32>, mempool: Option<Mempool>, network_stuck_check: Option<Duration>, node_key_file: Option<PathBuf>, persistence_mode: PersistenceMode, persistent_fragment_log: Option<PathBuf>, policy: Option<Policy>, preferred_layer: Option<PreferredListConfig>, public_address: Option<Multiaddr>, skip_bootstrap: Option<bool>, topics_of_interest: Option<TopicsOfInterest>, trusted_peers: Option<Vec<TrustedPeer>>, version: Option<Version>, verbose: bool, dns_server_address: Option<SocketAddr>,
}

Fields§

§alias: NodeAlias§bootstrap_from_peers: Option<bool>§faketime: Option<FaketimeConfig>§gossip_interval: Option<Duration>§jormungandr: Option<PathBuf>§leadership_mode: LeadershipMode§listen_address: Option<Option<SocketAddr>>§log_level: Option<LogLevel>§max_bootstrap_attempts: Option<usize>§max_connections: Option<u32>§allow_private_addresses: Option<bool>§whitelist: Option<Vec<Multiaddr>>§max_inbound_connections: Option<u32>§mempool: Option<Mempool>§network_stuck_check: Option<Duration>§node_key_file: Option<PathBuf>§persistence_mode: PersistenceMode§persistent_fragment_log: Option<PathBuf>§policy: Option<Policy>§preferred_layer: Option<PreferredListConfig>§public_address: Option<Multiaddr>§skip_bootstrap: Option<bool>§topics_of_interest: Option<TopicsOfInterest>§trusted_peers: Option<Vec<TrustedPeer>>§version: Option<Version>§verbose: bool§dns_server_address: Option<SocketAddr>

Implementations§

source§

impl SpawnParams

source

pub fn new(alias: &str) -> Self

source

pub fn get_alias(&self) -> &NodeAlias

source

pub fn no_listen_address(self) -> Self

source

pub fn listen_address(self, address: Option<SocketAddr>) -> Self

source

pub fn persistent_fragment_log<P: AsRef<Path>>(self, path: P) -> Self

source

pub fn get_leadership_mode(&self) -> LeadershipMode

source

pub fn is_leader(&self) -> bool

source

pub fn get_persistence_mode(&self) -> PersistenceMode

source

pub fn get_version(&self) -> &Option<Version>

source

pub fn get_verbose(&self) -> bool

source

pub fn topics_of_interest(self, topics_of_interest: TopicsOfInterest) -> Self

source

pub fn public_address(self, public_address: Multiaddr) -> Self

source

pub fn verbose(self, verbose: bool) -> Self

source

pub fn version(self, version: Version) -> Self

source

pub fn max_connections(self, max_connections: u32) -> Self

source

pub fn allow_private_addresses(self, switch: bool) -> Self

source

pub fn whitelist(self, nodes: Vec<Multiaddr>) -> Self

source

pub fn max_inbound_connections(self, max_inbound_connections: u32) -> Self

source

pub fn skip_bootstrap(self, skip_bootstrap: bool) -> Self

source

pub fn mempool(self, mempool: Mempool) -> Self

source

pub fn bootstrap_from_peers(self, bootstrap_from_peers: bool) -> Self

source

pub fn trusted_peers(self, trusted_peers: Vec<TrustedPeer>) -> Self

source

pub fn preferred_layer(self, preferred_layer: PreferredListConfig) -> Self

source

pub fn policy(self, policy: Policy) -> Self

source

pub fn jormungandr(self, jormungandr_app_path: PathBuf) -> Self

source

pub fn passive(self) -> Self

source

pub fn leader(self) -> Self

source

pub fn in_memory(self) -> Self

source

pub fn leadership_mode(self, leadership_mode: LeadershipMode) -> Self

source

pub fn persistence_mode(self, persistence_mode: PersistenceMode) -> Self

source

pub fn node_key_file(self, node_key_file: PathBuf) -> Self

source

pub fn faketime(self, faketime: FaketimeConfig) -> Self

source

pub fn get_faketime(&self) -> Option<&FaketimeConfig>

source

pub fn gossip_interval(self, duration: Duration) -> Self

source

pub fn log_level(self, level: LogLevel) -> Self

source

pub fn get_log_level(&self) -> Option<&LogLevel>

source

pub fn max_bootstrap_attempts(self, attempts: usize) -> Self

source

pub fn network_stuck_check(self, duration: Duration) -> Self

source

pub fn get_jormungandr(&self) -> &Option<PathBuf>

source

pub fn with_dns_server_address(self, addr: SocketAddr) -> Self

source

pub fn dns_server_address(&self) -> Option<&SocketAddr>

source

pub fn override_settings(&self, node_config: &mut NodeConfig)

Trait Implementations§

source§

impl Clone for SpawnParams

source§

fn clone(&self) -> SpawnParams

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for SpawnParams

source§

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

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

impl<'de> Deserialize<'de> for SpawnParams

source§

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

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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 Twhere 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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

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

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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