pub enum BlockRpc {
    Ok,
    GetBlock(Hash, Option<OrderTag>),
    PutBlock {
        hash: Hash,
        header: DataBlockHeader,
    },
    NeedBlockQuery(Hash),
    NeedBlockReply(bool),
}
Expand description

RPC messages used to share blocks of data between nodes

Variants§

§

Ok

§

GetBlock(Hash, Option<OrderTag>)

Message to ask for a block of data, by hash

§

PutBlock

Message to send a block of data, either because requested, of for first delivery of new block

Fields

§hash: Hash
§header: DataBlockHeader
§

NeedBlockQuery(Hash)

Ask other node if they should have this block, but don’t actually have it

§

NeedBlockReply(bool)

Response : whether the node do require that block

Trait Implementations§

source§

impl Debug for BlockRpc

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BlockRpc

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Message for BlockRpc

§

type Response = Result<BlockRpc, Error>

The type of the response that is sent in response to this message
source§

impl Serialize for BlockRpc

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StreamingEndpointHandler<BlockRpc> for BlockManager

source§

fn handle<'life0, 'async_trait>( self: &'life0 Arc<Self>, message: Req<BlockRpc>, _from: NodeID ) -> Pin<Box<dyn Future<Output = Resp<BlockRpc>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<M> IntoReq<M> for M
where M: Message,

source§

fn into_req(self) -> Result<Req<M>, Error>

Transform the object into a Req<M>, serializing the message M to be sent to remote nodes
source§

fn into_req_local(self) -> Req<M>

Transform the object into a Req<M>, skipping the serialization of message M, in the case we are not sending this RPC message to a remote node
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

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