pub enum ClientVersion {
    ParityClient(ParityClientData),
    ParityUnknownFormat(String),
    Other(String),
}
Expand description

Enum describing the version of the software running on a peer.

Variants

ParityClient(ParityClientData)

Tuple Fields

0: ParityClientData

The actual information fields: name, version, os, …

The peer runs software from parity and the string format is known

ParityUnknownFormat(String)

The string ID is recognized as Parity but the overall format could not be parsed

Other(String)

Other software vendors than Parity

Trait Implementations

Parity versions before PARITY_CLIENT_LARGE_REQUESTS_VERSION would not check the accumulated size of a packet when building a response to a GET_BLOCK_BODIES request. If the packet was larger than a given limit, instead of sending fewer blocks no packet would get sent at all. Query if this version can handle requests for a large number of block bodies. Read more

Service transactions are specific to parity and nethermind. Query if this version accepts them. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Parse a version string and return the corresponding ClientVersion. Only Parity clients are destructured right now, other strings will just get wrapped in a variant so that the information is not lost. The parsing for parity may still fail, in which case return a ParityUnknownFormat with the original version string. TryFrom would be a better trait to implement.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. 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.