[][src]Struct rust_ipv8::IPv8

pub struct IPv8 {
    pub config: Config,
    pub network_receiver: NetworkReceiver,
    pub network_sender: NetworkSender,
    pub communities: CommunityRegistry,
}

The IPv8 instance. This struct is how you can interact with the network.

To create a new IPv8 instance with the default configuration do this:

use rust_ipv8::IPv8;
use rust_ipv8::configuration::Config;

let ipv8 = IPv8::new(Config::default());

Fields

config: Config

Defines the config used forIPv8

network_receiver: NetworkReceiver

The network receiver which forwards the packets to the correct communities

network_sender: NetworkSender

The sender used for sending packets over the network

communities: CommunityRegistry

The registry containing all the communities

Methods

impl IPv8[src]

pub fn new(config: Config) -> Result<Self, Box<dyn Error>>[src]

Creates a new instance of the ipv8 struct

pub fn start(self)[src]

Starts ipv8 to actually listen for packets

Auto Trait Implementations

impl Unpin for IPv8

impl !Sync for IPv8

impl !Send for IPv8

impl !RefUnwindSafe for IPv8

impl !UnwindSafe for IPv8

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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