Struct casper_types::ProtocolVersion[][src]

pub struct ProtocolVersion(_);

A newtype wrapping a SemVer which represents a Casper Platform protocol version.

Implementations

impl ProtocolVersion[src]

pub const V1_0_0: ProtocolVersion[src]

Version 1.0.0.

pub const fn new(version: SemVer) -> ProtocolVersion[src]

Constructs a new ProtocolVersion from version.

pub const fn from_parts(major: u32, minor: u32, patch: u32) -> ProtocolVersion[src]

Constructs a new ProtocolVersion from the given semver parts.

pub fn value(&self) -> SemVer[src]

Returns the inner SemVer.

pub fn check_next_version(&self, next: &ProtocolVersion) -> VersionCheckResult[src]

Checks if next version can be followed.

pub fn is_compatible_with(&self, version: &ProtocolVersion) -> bool[src]

Checks if given protocol version is compatible with current one.

Two protocol versions with different major version are considered to be incompatible.

Trait Implementations

impl Clone for ProtocolVersion[src]

impl Copy for ProtocolVersion[src]

impl DataSize for ProtocolVersion[src]

impl Debug for ProtocolVersion[src]

impl Default for ProtocolVersion[src]

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

impl Display for ProtocolVersion[src]

impl Eq for ProtocolVersion[src]

impl FromBytes for ProtocolVersion[src]

impl Hash for ProtocolVersion[src]

impl Ord for ProtocolVersion[src]

impl PartialEq<ProtocolVersion> for ProtocolVersion[src]

impl PartialOrd<ProtocolVersion> for ProtocolVersion[src]

impl Serialize for ProtocolVersion[src]

impl StructuralEq for ProtocolVersion[src]

impl StructuralPartialEq for ProtocolVersion[src]

impl ToBytes 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> Conv for T

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

impl<T> FmtForward for T

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

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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> TryConv for T

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<V, T> VZip<V> for T where
    V: MultiLane<T>,