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
sourceimpl ClientCapabilities for ClientVersion
impl ClientCapabilities for ClientVersion
sourcefn can_handle_large_requests(&self) -> bool
fn can_handle_large_requests(&self) -> bool
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
sourcefn accepts_service_transaction(&self) -> bool
fn accepts_service_transaction(&self) -> bool
Service transactions are specific to parity and nethermind. Query if this version accepts them. Read more
sourceimpl Clone for ClientVersion
impl Clone for ClientVersion
sourcefn clone(&self) -> ClientVersion
fn clone(&self) -> ClientVersion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClientVersion
impl Debug for ClientVersion
sourceimpl Default for ClientVersion
impl Default for ClientVersion
sourceimpl Display for ClientVersion
impl Display for ClientVersion
sourceimpl<T> From<T> for ClientVersion where
T: AsRef<str>,
impl<T> From<T> for ClientVersion where
T: AsRef<str>,
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.
sourceimpl PartialEq<ClientVersion> for ClientVersion
impl PartialEq<ClientVersion> for ClientVersion
sourcefn eq(&self, other: &ClientVersion) -> bool
fn eq(&self, other: &ClientVersion) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ClientVersion) -> bool
fn ne(&self, other: &ClientVersion) -> bool
This method tests for !=
.
sourceimpl Serialize for ClientVersion
impl Serialize for ClientVersion
impl Eq for ClientVersion
impl StructuralEq for ClientVersion
impl StructuralPartialEq for ClientVersion
Auto Trait Implementations
impl RefUnwindSafe for ClientVersion
impl Send for ClientVersion
impl Sync for ClientVersion
impl Unpin for ClientVersion
impl UnwindSafe for ClientVersion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more