[][src]Struct koibumi_node_sync::ConfigBuilder

pub struct ConfigBuilder { /* fields omitted */ }

A builder for building a configuration set for a Koibumi Bitmessage node.

Implementations

impl Builder[src]

pub fn core(&mut self, core: CoreConfig) -> &mut Self[src]

Sets the core configuration set which the configuration set this builder builds contains. The default is the default of the core configuration set.

pub fn channel_buffer(&mut self, v: usize) -> &mut Self[src]

Sets the buffer size of channels which created in this node. The default is 0x10000.

pub fn server(&mut self, addr: Option<StdSocketAddr>) -> &mut Self[src]

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

pub fn socks(&mut self, addr: Option<StdSocketAddr>) -> &mut Self[src]

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

pub fn socks_auth(&mut self, auth: Option<SocksAuth>) -> &mut Self[src]

Sets the Option of the authentication method of the SOCKS5 which is used by outgoing connections. The default is None.

pub fn connect_to_onion(&mut self, b: bool) -> &mut Self[src]

Sets the flag whether this node connects to remote nodes that have Onion addresses. Only outgoing connections are affected. The default is false.

pub fn connect_to_ip(&mut self, b: bool) -> &mut Self[src]

Sets the flag whether this node connects to remote nodes that have IP addresses. Only outgoing connections are affected. The default is false.

pub fn connect_to_myself(&mut self, b: bool) -> &mut Self[src]

Sets the flag whether this node can connect to this node itself. The default is false.

pub fn user_agent(&mut self, s: UserAgent) -> &mut Self[src]

Sets the user agent which is sent to the nodes this node connected to. The default is "/PyBitmessage:0.6.3.2/".

pub fn stream_numbers(&mut self, list: StreamNumbers) -> &mut Self[src]

Sets the set of stream numbers that this node is interested in. The default is [1].

pub fn seeds(&mut self, list: Vec<SocketAddrExt>) -> &mut Self[src]

Sets the list of socket addresses of the seed nodes. The default is [].

pub fn bootstraps(&mut self, list: Vec<SocketAddrNode>) -> &mut Self[src]

Sets the list of socket addresses of the bootstrap domain names. The default is [].

pub fn max_incoming_connected(&mut self, n: usize) -> &mut Self[src]

Sets the maximum number of incoming connections this node accepts. The default is 160.

pub fn max_incoming_established(&mut self, n: usize) -> &mut Self[src]

Sets the maximum number of incoming established connections this node accepts. The default is 128.

pub fn max_outgoing_initiated(&mut self, n: usize) -> &mut Self[src]

Sets the maximum number of outgoing conections this node initiates. The default is 32.

pub fn max_outgoing_established(&mut self, n: usize) -> &mut Self[src]

Sets the maximum number of outgoing established connections this node keeps. The default is 8.

pub fn max_nodes(&mut self, n: usize) -> &mut Self[src]

Sets the maximum number of node addresses this node memorizes. The default is 20000.

pub fn own_nodes(&mut self, list: Vec<SocketAddrExt>) -> &mut Self[src]

Sets the list of the socket addresses of the own node. The default is [].

pub fn build(&self) -> Config[src]

Returns the configuration set this builder represents.

Trait Implementations

impl Clone for Builder[src]

impl Debug for Builder[src]

impl Default for Builder[src]

impl Eq for Builder[src]

impl PartialEq<Builder> for Builder[src]

impl StructuralEq for Builder[src]

impl StructuralPartialEq for Builder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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