Skip to content

Commit cdfbff6

Browse files
authored
Merge pull request #51 from EventStore/release-1.0
Cut 1.0.0 release.
2 parents 46b0246 + 40eac8e commit cdfbff6

File tree

8 files changed

+20
-10
lines changed

8 files changed

+20
-10
lines changed

Diff for: CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
0.9.10
1+
1.0.0
22
======
33
* Support Tokio 1.* and Tonic 0.4.
44
* Fix how is_json is extracted for persistent subscriptions.
5+
* Apply same public API as other official gRPC clients.
56

67
0.9.9
78
=====
@@ -13,7 +14,7 @@
1314

1415
0.9.7
1516
=====
16-
* Update DNS discovery so it works properly with EventStore Cloud.
17+
* Update DNS discovery, so it works properly with EventStore Cloud.
1718
* Expose `ClientSettings` values.
1819
* Load native certificates when TLS is enabled.
1920

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "eventstore"
3-
version = "0.9.10"
3+
version = "1.0.0"
44
authors = ["Yorick Laupa <[email protected]>"]
55
edition = "2018"
66

Diff for: README.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Official Rust [EventStoreDB] gRPC Client.
99

1010
[EventStoreDB] is an open-source database built from the ground up for Event Sourcing, with Complex Event Processing in Javascript.
1111

12-
_Note: This client is currently under active development and further API changes are expected. Feedback is very welcome._
13-
1412
## EventStoreDB Server Compatibility
1513
This client is compatible with version `20.6.1` upwards and works on Linux, MacOS and Windows.
1614

Diff for: src/client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl Client {
110110
/// 100, and then any events subsequently written events until such time
111111
/// as the subscription is dropped or closed.
112112
///
113-
/// [`subscribe_to_all_from`]: #method.subscribe_to_all_from
113+
/// [`subscribe_to_all`]: #method.subscribe_to_all_from
114114
pub async fn subscribe_to_stream<'a, StreamName>(
115115
&self,
116116
stream_name: StreamName,

Diff for: src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
//!
33
//! [EventStoreDB] is an open-source database built from the ground up for Event Sourcing, with Complex Event Processing in Javascript.
44
//!
5-
//! _Note: This client is currently under active development and further API changes are expected. Feedback is very welcome._
6-
//!
75
//! ## EventStoreDB Server Compatibility
86
//! This client is compatible with version `20.6.1` upwards and works on Linux, MacOS and Windows.
97
//!
@@ -69,6 +67,7 @@ mod event_store;
6967
mod gossip;
7068
mod grpc;
7169
mod options;
70+
mod private;
7271
mod types;
7372

7473
pub use client::Client;

Diff for: src/options/append_to_stream.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::event_store::client::shared::Empty;
22
use crate::event_store::client::streams::append_req::options::ExpectedStreamRevision;
3+
use crate::private::Sealed;
34
use crate::{Credentials, EventData, ExpectedRevision};
45
use futures::future::Ready;
56
use futures::stream::{Iter, Once};
@@ -46,7 +47,7 @@ impl AppendToStreamOptions {
4647

4748
pub struct Streaming<S>(S);
4849

49-
pub trait ToEvents {
50+
pub trait ToEvents: Sealed {
5051
type Events: Stream<Item = EventData> + Send + Sync;
5152
fn into_events(self) -> Self::Events;
5253
}

Diff for: src/private.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use crate::{All, EventData, Single, Streaming};
2+
3+
pub trait Sealed {}
4+
5+
impl Sealed for usize {}
6+
impl Sealed for EventData {}
7+
impl<A: Sealed> Sealed for Vec<A> {}
8+
impl<A> Sealed for Streaming<A> {}
9+
impl Sealed for All {}
10+
impl Sealed for Single {}

Diff for: src/types.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::cmp::Ordering;
44
use std::collections::HashMap;
55
use std::time::Duration;
66

7+
use crate::private::Sealed;
78
use async_trait::async_trait;
89
use bytes::Bytes;
910
use futures::stream::BoxStream;
@@ -964,7 +965,7 @@ impl<A> ReadResult<A> {
964965
}
965966

966967
#[async_trait]
967-
pub trait ToCount<'a> {
968+
pub trait ToCount<'a>: Sealed {
968969
type Selection;
969970
fn to_count(&self) -> usize;
970971
async fn select(

0 commit comments

Comments
 (0)