pub struct JormungandrServerImpl {
    data: Arc<RwLock<MockServerData>>,
}

Fields§

§data: Arc<RwLock<MockServerData>>

Implementations§

Trait Implementations§

source§

impl Node for JormungandrServerImpl

§

type PullBlocksStream = ReceiverStream<Result<Block, Status>>

Server streaming response type for the PullBlocks method.
§

type PullBlocksToTipStream = ReceiverStream<Result<Block, Status>>

Server streaming response type for the PullBlocksToTip method.
§

type GetBlocksStream = ReceiverStream<Result<Block, Status>>

Server streaming response type for the GetBlocks method.
§

type PullHeadersStream = ReceiverStream<Result<Header, Status>>

Server streaming response type for the PullHeaders method.
§

type GetHeadersStream = ReceiverStream<Result<Header, Status>>

Server streaming response type for the GetHeaders method.
§

type GetFragmentsStream = ReceiverStream<Result<Fragment, Status>>

Server streaming response type for the GetFragments method.
§

type BlockSubscriptionStream = ReceiverStream<Result<BlockEvent, Status>>

Server streaming response type for the BlockSubscription method.
§

type FragmentSubscriptionStream = ReceiverStream<Result<Fragment, Status>>

Server streaming response type for the FragmentSubscription method.
§

type GossipSubscriptionStream = ReceiverStream<Result<Gossip, Status>>

Server streaming response type for the GossipSubscription method.
source§

fn handshake<'life0, 'async_trait>( &'life0 self, request: Request<HandshakeRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<HandshakeResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Initial handshake and authentication of the server node.
source§

fn client_auth<'life0, 'async_trait>( &'life0 self, request: Request<ClientAuthRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<ClientAuthResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Optional authentication of the client node. Called after Handshake.
source§

fn tip<'life0, 'async_trait>( &'life0 self, _request: Request<TipRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<TipResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn peers<'life0, 'async_trait>( &'life0 self, _request: Request<PeersRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<PeersResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Requests for some peers
source§

fn get_blocks<'life0, 'async_trait>( &'life0 self, request: Request<BlockIds> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetBlocksStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_headers<'life0, 'async_trait>( &'life0 self, _request: Request<BlockIds> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetHeadersStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_fragments<'life0, 'async_trait>( &'life0 self, _request: Request<FragmentIds> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetFragmentsStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn pull_headers<'life0, 'async_trait>( &'life0 self, _request: Request<PullHeadersRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::PullHeadersStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Requests headers of blocks in the chain in the chronological order, given a selection of possible starting blocks known by the requester, and the identifier of the end block to be included in the returned sequence.
source§

fn pull_blocks<'life0, 'async_trait>( &'life0 self, request: Request<PullBlocksRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::PullBlocksStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Requests blocks in the chain in the chronological order, given a selection of possible starting blocks known by the requester, and the identifier of the end block to be included in the returned sequence.
source§

fn pull_blocks_to_tip<'life0, 'async_trait>( &'life0 self, _request: Request<PullBlocksToTipRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::PullBlocksToTipStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn push_headers<'life0, 'async_trait>( &'life0 self, _request: Request<Streaming<Header>> ) -> Pin<Box<dyn Future<Output = Result<Response<PushHeadersResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Sends headers of blocks to the service in response to a missing item received from the BlockSubscription response stream. The headers are streamed the in chronological order of the chain.
source§

fn upload_blocks<'life0, 'async_trait>( &'life0 self, _request: Request<Streaming<Block>> ) -> Pin<Box<dyn Future<Output = Result<Response<UploadBlocksResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Uploads blocks to the service in response to a solicit item received from the BlockSubscription response stream.
source§

fn block_subscription<'life0, 'async_trait>( &'life0 self, _request: Request<Streaming<Header>> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::BlockSubscriptionStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Establishes a bidirectional stream to exchange information on new blocks created or accepted by the peers.
source§

fn fragment_subscription<'life0, 'async_trait>( &'life0 self, _request: Request<Streaming<Fragment>> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::FragmentSubscriptionStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Establishes a bidirectional stream to exchange information on new block fragments created or accepted by the peers.
source§

fn gossip_subscription<'life0, 'async_trait>( &'life0 self, _request: Request<Streaming<Gossip>> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GossipSubscriptionStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Establishes a bidirectional stream to exchange information on new network peers.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

§

impl<T> Instrument for T

§

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

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

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 Twhere 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<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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