pub struct Config { /* private fields */ }Expand description
A set of configurations for a Koibumi Bitmessage node.
Implementations§
Source§impl Config
impl Config
Sourcepub fn core(&self) -> &CoreConfig
pub fn core(&self) -> &CoreConfig
Returns the core configuration set which this configuration set contains. The default is the default of the core configuration set.
Sourcepub fn channel_buffer(&self) -> usize
pub fn channel_buffer(&self) -> usize
Returns the buffer size of channels
which will be created in this node.
The default is 0x10000.
Sourcepub fn server(&self) -> &Option<StdSocketAddr>
pub fn server(&self) -> &Option<StdSocketAddr>
Returns the Option of the socket address of the server
which listens incomming connections.
If this is None, no server will be launched.
The default is None.
Sourcepub fn socks(&self) -> &Option<StdSocketAddr>
pub fn socks(&self) -> &Option<StdSocketAddr>
Returns the Option of the socket address of the SOCKS5 server
which is used by outgoing connections.
If this is None, connections are directly to Clearnet.
The default is None.
Sourcepub fn socks_auth(&self) -> &Option<SocksAuth>
pub fn socks_auth(&self) -> &Option<SocksAuth>
Returns the Option of the authentication method of the SOCKS5
which is used by outgoing connections.
The default is None.
Sourcepub fn connect_to_onion(&self) -> bool
pub fn connect_to_onion(&self) -> bool
Returns the flag whether this node connects to remote nodes
that have Onion addresses.
Only outgoing connections are affected.
The default is false.
Sourcepub fn connect_to_ip(&self) -> bool
pub fn connect_to_ip(&self) -> bool
Returns the flag whether this node connects to remote nodes
that have IP addresses.
Only outgoing connections are affected.
The default is false.
Sourcepub fn is_connectable_to(&self, addr: &SocketAddrNode) -> bool
pub fn is_connectable_to(&self, addr: &SocketAddrNode) -> bool
Returns whether this node can connect to the node specified by the socket address. It is affected by the type of the address which is Onion or IP.
Sourcepub fn connect_to_myself(&self) -> bool
pub fn connect_to_myself(&self) -> bool
Returns the flag whether this node can connect to this node itself.
The default is false.
Sourcepub fn user_agent(&self) -> &UserAgent
pub fn user_agent(&self) -> &UserAgent
Returns the user agent which is sent to the nodes
this node connected to.
The default is "/PyBitmessage:0.6.3.2/".
Sourcepub fn stream_numbers(&self) -> &StreamNumbers
pub fn stream_numbers(&self) -> &StreamNumbers
Returns the set of stream numbers
that this node is interested in.
The default is [1].
Sourcepub fn seeds(&self) -> &[SocketAddrExt]
pub fn seeds(&self) -> &[SocketAddrExt]
Returns the list of socket addresses of the seed nodes.
The default is [].
Sourcepub fn bootstraps(&self) -> &[SocketAddrNode]
pub fn bootstraps(&self) -> &[SocketAddrNode]
Returns the list of socket addresses of the bootstrap domain names.
The default is [].
Sourcepub fn max_incoming_connected(&self) -> usize
pub fn max_incoming_connected(&self) -> usize
Returns the maximum number of incoming connections
this node accepts.
The default is 160.
Sourcepub fn max_incoming_established(&self) -> usize
pub fn max_incoming_established(&self) -> usize
Returns the maximum number of incoming established connections
this node accepts.
The default is 128.
Sourcepub fn max_outgoing_initiated(&self) -> usize
pub fn max_outgoing_initiated(&self) -> usize
Returns the maximum number of outgoing conections
this node initiates.
The default is 32.
Sourcepub fn max_outgoing_established(&self) -> usize
pub fn max_outgoing_established(&self) -> usize
Returns the maximum number of outgoing established connections
this node keeps.
The default is 8.
Sourcepub fn max_nodes(&self) -> usize
pub fn max_nodes(&self) -> usize
Returns the maximum number of node addresses
this node memorizes.
The default is 20000.
Sourcepub fn own_nodes(&self) -> &[SocketAddrExt]
pub fn own_nodes(&self) -> &[SocketAddrExt]
Returns the list of the socket addresses of the own node.
The default is [].
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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