pub struct Client { /* private fields */ }
Expand description

Represents a client to a single node. Client maintains a full duplex communication to EventStoreDB.

Many threads can use an EventStoreDB client at the same time or a single thread can make many asynchronous requests.

Implementations

Creates a gRPC client to an EventStoreDB database.

Creates a gRPC client to an EventStoreDB database using an existing tokio runtime.

Sends events to a given stream.

Reads events from a given stream. The reading can be done forward and backward.

Reads events for the system stream $all. The reading can be done forward and backward.

Reads a stream metadata.

Soft deletes a given stream. Makes use of Truncate before. When a stream is deleted, its Truncate before is set to the streams current last event number. When a soft deleted stream is read, the read will return a StreamNotFound. After deleting the stream, you are able to write to it again, continuing from where it left off.

Hard deletes a given stream. A hard delete writes a tombstone event to the stream, permanently deleting it. The stream cannot be recreated or written to again. Tombstone events are written with the event type ‘$streamDeleted’. When a hard deleted stream is read, the read will return a StreamDeleted.

Subscribes to a given stream. This kind of subscription specifies a starting point (by default, the beginning of a stream). For a regular stream, that starting point will be an event number. For the system stream $all, it will be a position in the transaction file (see subscribe_to_all). This subscription will fetch every event until the end of the stream, then will dispatch subsequently written events.

For example, if a starting point of 50 is specified when a stream has 100 events in it, the subscriber can expect to see events 51 through 100, and then any events subsequently written events until such time as the subscription is dropped or closed.

Like subscribe_to_stream but specific to system $all stream.

Creates a persistent subscription group on a stream.

Persistent subscriptions are special kind of subscription where the server remembers the state of the subscription. This allows for many different modes of operations compared to a regular or catchup subscription where the client holds the subscription state.

Creates a persistent subscription group on a the $all stream.

Updates a persistent subscription group on a stream.

Updates a persistent subscription group to $all.

Deletes a persistent subscription group on a stream.

Deletes a persistent subscription group on the $all stream.

Connects to a persistent subscription group on a stream.

Connects to a persistent subscription group to $all stream.

Replays a persistent subscriptions parked events.

Replays a persistent subscriptions to $all parked events.

Lists all persistent subscriptions to date.

List all persistent subscriptions of a specific stream.

List all persistent subscriptions of the $all stream.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

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

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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