Enum ethp2p::EthVersion
source · [−]#[repr(u8)]
pub enum EthVersion {
Eth66,
Eth67,
}
Expand description
The eth
protocol version.
Variants
Eth66
Eth67
Trait Implementations
sourceimpl Clone for EthVersion
impl Clone for EthVersion
sourcefn clone(&self) -> EthVersion
fn clone(&self) -> EthVersion
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 moresourceimpl Debug for EthVersion
impl Debug for EthVersion
sourceimpl<'de> Deserialize<'de> for EthVersion
impl<'de> Deserialize<'de> for EthVersion
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<EthVersion> for &'static str
impl From<EthVersion> for &'static str
sourcefn from(v: EthVersion) -> &'static str
fn from(v: EthVersion) -> &'static str
Converts to this type from the input type.
sourceimpl From<EthVersion> for u8
impl From<EthVersion> for u8
sourcefn from(v: EthVersion) -> u8
fn from(v: EthVersion) -> u8
Converts to this type from the input type.
sourceimpl FromStr for EthVersion
impl FromStr for EthVersion
sourceimpl Hash for EthVersion
impl Hash for EthVersion
sourceimpl PartialEq<EthVersion> for EthVersion
impl PartialEq<EthVersion> for EthVersion
sourcefn eq(&self, other: &EthVersion) -> bool
fn eq(&self, other: &EthVersion) -> bool
sourceimpl Serialize for EthVersion
impl Serialize for EthVersion
sourceimpl TryFrom<&str> for EthVersion
impl TryFrom<&str> for EthVersion
Allow for converting from a &str
to an EthVersion
.
Example
use ethp2p::EthVersion;
use std::convert::TryFrom;
let version = EthVersion::try_from("67").unwrap();
assert_eq!(version, EthVersion::Eth67);
sourceimpl TryFrom<u8> for EthVersion
impl TryFrom<u8> for EthVersion
Allow for converting from a u8 to an EthVersion
.
Example
use ethp2p::EthVersion;
use std::convert::TryFrom;
let version = EthVersion::try_from(67).unwrap();
assert_eq!(version, EthVersion::Eth67);
impl Copy for EthVersion
impl Eq for EthVersion
impl StructuralEq for EthVersion
impl StructuralPartialEq for EthVersion
Auto Trait Implementations
impl RefUnwindSafe for EthVersion
impl Send for EthVersion
impl Sync for EthVersion
impl Unpin for EthVersion
impl UnwindSafe for EthVersion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more