Skip to main content

Crate dnet_rpc

Crate dnet_rpc 

Source
Expand description

RPC over dnet transports.

Re-exports§

pub use consumer::Consume;
pub use consumer::StreamRequest;
pub use consumer::ValueRequest;
pub use dnet_base;
pub use atomic_counter;
pub use futures;

Modules§

consumer
Consumer related functionality.
parts
Parts used internally to build RPC infrastructure for an API.
producer
Producer related functionality.

Structs§

Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
JoinHandle
An owned permission to join on a task (await its termination).
Sleep
Future returned by sleep and sleep_until.

Enums§

Error
RPC error.
ShutdownType
Cause of producer/consumer shutdown.
Timeout
Timeout future.

Traits§

Shutdown
Helper trait for shutdown futures used by producers and consumers.
Transport
Helper trait for transports used by dnet-rpc.
TransportError
Helper trait for consumer errors.

Functions§

sleep
Waits until duration has elapsed.
spawn
Spawns a new asynchronous task, returning a JoinHandle for it.

Attribute Macros§

abortable
Marker for api functions that will provide producer with AbortionToken which will be triggered when consumer aborts the request.
api
Macro for marking traits defining api’s interface.
no_ack
Marker for api functions that are “fire-and-forget” - they return as soon as request is sent to the producer without waiting for response - in fact producer won’t even send it.
no_serde
Used together with api macro, disables attachment of serde Serialize and/or Deserialize derive macros on generated Request and/or Response enums.

Derive Macros§

Produce
Derive macro implementing Produce trait for struct.