[][src]Enum blockchain_network_simple::SimpleSyncMessage

pub enum SimpleSyncMessage<B, S> {
    Status(S),
    BlockRequest {
        start_depth: usize,
        count: usize,
    },
    BlockResponse {
        blocks: Vec<B>,
    },
}

Variants

Status(S)BlockRequest

Fields of BlockRequest

start_depth: usizecount: usize
BlockResponse

Fields of BlockResponse

blocks: Vec<B>

Trait Implementations

impl<B: Clone, S: Clone> Clone for SimpleSyncMessage<B, S>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<B: Debug, S: Debug> Debug for SimpleSyncMessage<B, S>[src]

impl<B, S> Encode for SimpleSyncMessage<B, S> where
    S: Encode,
    S: Encode,
    Vec<B>: Encode,
    Vec<B>: Encode
[src]

fn encode(&self) -> Vec<u8>[src]

Convert self to an owned vector.

fn using_encoded<R, F>(&self, f: F) -> R where
    F: FnOnce(&[u8]) -> R, 
[src]

Convert self to a slice and then invoke the given closure with it.

impl<B, S> Decode for SimpleSyncMessage<B, S> where
    S: Decode,
    S: Decode,
    Vec<B>: Decode,
    Vec<B>: Decode
[src]

Auto Trait Implementations

impl<B, S> Send for SimpleSyncMessage<B, S> where
    B: Send,
    S: Send

impl<B, S> Sync for SimpleSyncMessage<B, S> where
    B: Sync,
    S: Sync

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<S> Codec for S where
    S: Encode + Decode
[src]

impl<T> KeyedVec for T where
    T: Codec
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.