pub struct Peer { /* private fields */ }
Available on crate feature compact_filters only.
Expand description

A Bitcoin peer

Implementations

Connect to a peer over a plaintext TCP connection

This function internally spawns a new thread that will monitor incoming messages from the peer, and optionally reply to some of them transparently, like pings

Connect to a peer through a SOCKS5 proxy, optionally by using some credentials, specified as a tuple of (username, password)

This function internally spawns a new thread that will monitor incoming messages from the peer, and optionally reply to some of them transparently, like pings

Return the VersionMessage sent by the peer

Return the Bitcoin Network in use

Return the mempool used by this peer

Return whether or not the peer is still connected

Send a raw Bitcoin message to the peer

Waits for a specific incoming Bitcoin message, optionally with a timeout

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.