[][src]Struct grin_core::ser::ProtocolVersion

pub struct ProtocolVersion(pub u32);

Protocol version for serialization/deserialization. Note: This is used in various places including but limited to the p2p layer and our local db storage layer. We may speak multiple versions to various peers and a potentially different version for our local db.

Methods

impl ProtocolVersion[src]

pub const MAX: u32[src]

The max protocol version supported.

pub fn value(self) -> u32[src]

Protocol version as u32 to allow for convenient exhaustive matching on values.

pub fn local() -> ProtocolVersion[src]

Our default "local" protocol version. This protocol version is provided to peers as part of the Hand/Shake negotiation in the p2p layer. Connected peers will negotiate a suitable protocol version for serialization/deserialization of p2p messages.

pub fn local_db() -> ProtocolVersion[src]

We need to specify a protocol version for our local database. Regardless of specific version used when sending/receiving data between peers we need to take care with serialization/deserialization of data locally in the db.

Trait Implementations

impl Clone for ProtocolVersion[src]

impl Copy for ProtocolVersion[src]

impl Debug for ProtocolVersion[src]

impl<'de> Deserialize<'de> for ProtocolVersion[src]

impl Display for ProtocolVersion[src]

impl Eq for ProtocolVersion[src]

impl From<ProtocolVersion> for u32[src]

impl Ord for ProtocolVersion[src]

impl PartialEq<ProtocolVersion> for ProtocolVersion[src]

impl PartialOrd<ProtocolVersion> for ProtocolVersion[src]

impl Readable for ProtocolVersion[src]

impl Serialize for ProtocolVersion[src]

impl StructuralEq for ProtocolVersion[src]

impl StructuralPartialEq for ProtocolVersion[src]

impl Writeable for ProtocolVersion[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

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> UnsafeAny for T where
    T: Any