[][src]Struct tmkms::session::Session

pub struct Session<Connection> { /* fields omitted */ }

Encrypted session with a validator node

Methods

impl Session<SecretConnection<TcpStream>>[src]

pub fn connect_tcp(
    chain_id: Id,
    max_height: Option<Height>,
    validator_peer_id: Option<Id>,
    host: &str,
    port: u16,
    secret_connection_key: &Seed
) -> Result<Self, Error>
[src]

Create a new validator connection at the given TCP/IP address/port

impl Session<UnixConnection<UnixStream>>[src]

pub fn connect_unix(
    chain_id: Id,
    max_height: Option<Height>,
    socket_path: &Path
) -> Result<Self, Error>
[src]

Create a new Unix domain socket connection to a validator

impl<Connection> Session<Connection> where
    Connection: Read + Write + Sync + Send
[src]

pub fn request_loop(
    &mut self,
    should_term: &Arc<AtomicBool>
) -> Result<(), Error>
[src]

Main request loop

Auto Trait Implementations

impl<Connection> Send for Session<Connection> where
    Connection: Send

impl<Connection> Unpin for Session<Connection> where
    Connection: Unpin

impl<Connection> Sync for Session<Connection> where
    Connection: Sync

impl<Connection> UnwindSafe for Session<Connection> where
    Connection: UnwindSafe

impl<Connection> RefUnwindSafe for Session<Connection> where
    Connection: RefUnwindSafe

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self