[][src]Trait hycon_rust::traits::Proto

pub trait Proto {
type ProtoType;
    fn to_proto(&self) -> Result<Self::ProtoType, Box<dyn Error>>;
fn from_proto(prototype: &Self::ProtoType) -> Result<Self, Box<dyn Error>>
    where
        Self: Sized
; }

Converts items to/from the protobuf version

Associated Types

type ProtoType

Loading content...

Required methods

fn to_proto(&self) -> Result<Self::ProtoType, Box<dyn Error>>

fn from_proto(prototype: &Self::ProtoType) -> Result<Self, Box<dyn Error>> where
    Self: Sized

Loading content...

Implementors

impl Proto for Account[src]

type ProtoType = ProtoAccount

impl Proto for DBState[src]

type ProtoType = ProtoDBState

impl Proto for NodeRef[src]

type ProtoType = ProtoNodeRef

impl Proto for StateNode[src]

type ProtoType = ProtoStateNode

impl Proto for Block<Header, SignedTx>[src]

type ProtoType = ProtoBlock

impl Proto for ExodusBlock[src]

type ProtoType = ProtoBlock

impl Proto for ExodusTx[src]

type ProtoType = ProtoExodusTx

impl Proto for GenesisBlock[src]

type ProtoType = ProtoBlock

impl Proto for GenesisHeader[src]

type ProtoType = ProtoGenesisHeader

impl Proto for GenesisTx[src]

type ProtoType = ProtoGenesisTx

impl Proto for Header[src]

type ProtoType = ProtoBlockHeader

impl Proto for SignedGenesisTx[src]

type ProtoType = ProtoGenesisSignedTx

impl Proto for SignedTx[src]

type ProtoType = ProtoSignedTx

impl Proto for Tx[src]

type ProtoType = ProtoTx

impl Proto for NetworkMessage[src]

type ProtoType = ProtoNetwork

impl Proto for Tip[src]

type ProtoType = GetTipReturn

impl<HeaderType> Proto for Meta<HeaderType> where
    HeaderType: BlockHeader + Clone + Proto + Encode
[src]

type ProtoType = ProtoBlockDB

Loading content...