[][src]Struct i2p_client::I2PClient

pub struct I2PClient {
    pub local_full_dest: String,
    pub local_dest: String,
    // some fields omitted
}

Fields

local_full_dest: String

Destination used for establishing a Session (884 bytes): destination + priv key + signing key

local_dest: String

Destination used for sending a Datagram (516 bytes): destination

Methods

impl I2PClient[src]

pub fn new(
    use_local: bool,
    alias: String,
    min_version: &str,
    max_version: &str,
    max_connection_attempts: u8
) -> Result<I2PClient, Error>
[src]

pub fn aliases() -> HashMap<String, String>[src]

pub fn dest(alias: &str) -> String[src]

pub fn gen(&mut self, sig_type: SigType) -> Result<(String, String), Error>[src]

Generate Public and Private keys IAW sig_type; return in tuple (PUB,PRIV)

pub fn send(&mut self, to: String, msg: Vec<u8>)[src]

Send to destination UTF-8 formatted bytes

pub fn receive(&mut self) -> Result<(String, Vec<u8>), Error>[src]

Receive tuple with from destination and message in UTF-8 formatted bytes

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