[][src]Struct exonum::messages::Connect

pub struct Connect {
    pub host: String,
    pub time: DateTime<Utc>,
    pub user_agent: String,
}

Connect to a node.

Validation

The message is ignored if its time is earlier than in the previous Connect message received from the same peer.

Processing

Connect to the peer.

Generation

A node sends Connect message to all known addresses during initialization. Additionally, the node responds by its own Connect message after receiving node::Event::Connected.

Fields

host: String

The node's public address.

time: DateTime<Utc>

Time when the message was created.

user_agent: String

String containing information about this node including Exonum, Rust and OS versions.

Methods

impl Connect[src]

pub fn new(
    host: impl Into<String>,
    time: DateTime<Utc>,
    user_agent: impl Into<String>
) -> Self
[src]

Create new Connect message.

pub fn pub_addr(&self) -> &str[src]

The node's address.

pub fn time(&self) -> DateTime<Utc>[src]

Time when the message was created.

pub fn user_agent(&self) -> &str[src]

String containing information about this node including Exonum, Rust and OS versions.

Trait Implementations

impl From<Connect> for ExonumMessage[src]

impl Clone for Connect[src]

impl Eq for Connect[src]

impl Ord for Connect[src]

impl PartialEq<Connect> for Connect[src]

impl PartialOrd<Connect> for Connect[src]

impl Debug for Connect[src]

impl TryFrom<ExonumMessage> for Connect[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<SignedMessage> for Connect[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ SignedMessage> for Connect[src]

type Error = Error

The type returned in the event of a conversion error.

impl StructuralPartialEq for Connect[src]

impl StructuralEq for Connect[src]

impl ProtobufConvert for Connect[src]

type ProtoStruct = Connect

Type of the protobuf clone of Self

Auto Trait Implementations

impl Send for Connect

impl Sync for Connect

impl Unpin for Connect

impl UnwindSafe for Connect

impl RefUnwindSafe for Connect

Blanket Implementations

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

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

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 = !

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]

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

impl<T> Erased for T

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]