Skip to content

Commit

Permalink
Merge pull request #51 from EventStore/release-1.0
Browse files Browse the repository at this point in the history
Cut 1.0.0 release.
  • Loading branch information
YoEight authored Feb 15, 2021
2 parents 46b0246 + 40eac8e commit cdfbff6
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
0.9.10
1.0.0
======
* Support Tokio 1.* and Tonic 0.4.
* Fix how is_json is extracted for persistent subscriptions.
* Apply same public API as other official gRPC clients.

0.9.9
=====
Expand All @@ -13,7 +14,7 @@

0.9.7
=====
* Update DNS discovery so it works properly with EventStore Cloud.
* Update DNS discovery, so it works properly with EventStore Cloud.
* Expose `ClientSettings` values.
* Load native certificates when TLS is enabled.

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "eventstore"
version = "0.9.10"
version = "1.0.0"
authors = ["Yorick Laupa <yo.eight@gmail.com>"]
edition = "2018"

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Official Rust [EventStoreDB] gRPC Client.

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

_Note: This client is currently under active development and further API changes are expected. Feedback is very welcome._

## EventStoreDB Server Compatibility
This client is compatible with version `20.6.1` upwards and works on Linux, MacOS and Windows.

Expand Down
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Client {
/// 100, and then any events subsequently written events until such time
/// as the subscription is dropped or closed.
///
/// [`subscribe_to_all_from`]: #method.subscribe_to_all_from
/// [`subscribe_to_all`]: #method.subscribe_to_all_from
pub async fn subscribe_to_stream<'a, StreamName>(
&self,
stream_name: StreamName,
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//!
//! [EventStoreDB] is an open-source database built from the ground up for Event Sourcing, with Complex Event Processing in Javascript.
//!
//! _Note: This client is currently under active development and further API changes are expected. Feedback is very welcome._
//!
//! ## EventStoreDB Server Compatibility
//! This client is compatible with version `20.6.1` upwards and works on Linux, MacOS and Windows.
//!
Expand Down Expand Up @@ -69,6 +67,7 @@ mod event_store;
mod gossip;
mod grpc;
mod options;
mod private;
mod types;

pub use client::Client;
Expand Down
3 changes: 2 additions & 1 deletion src/options/append_to_stream.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::event_store::client::shared::Empty;
use crate::event_store::client::streams::append_req::options::ExpectedStreamRevision;
use crate::private::Sealed;
use crate::{Credentials, EventData, ExpectedRevision};
use futures::future::Ready;
use futures::stream::{Iter, Once};
Expand Down Expand Up @@ -46,7 +47,7 @@ impl AppendToStreamOptions {

pub struct Streaming<S>(S);

pub trait ToEvents {
pub trait ToEvents: Sealed {
type Events: Stream<Item = EventData> + Send + Sync;
fn into_events(self) -> Self::Events;
}
Expand Down
10 changes: 10 additions & 0 deletions src/private.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::{All, EventData, Single, Streaming};

pub trait Sealed {}

impl Sealed for usize {}
impl Sealed for EventData {}
impl<A: Sealed> Sealed for Vec<A> {}
impl<A> Sealed for Streaming<A> {}
impl Sealed for All {}
impl Sealed for Single {}
3 changes: 2 additions & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::cmp::Ordering;
use std::collections::HashMap;
use std::time::Duration;

use crate::private::Sealed;
use async_trait::async_trait;
use bytes::Bytes;
use futures::stream::BoxStream;
Expand Down Expand Up @@ -964,7 +965,7 @@ impl<A> ReadResult<A> {
}

#[async_trait]
pub trait ToCount<'a> {
pub trait ToCount<'a>: Sealed {
type Selection;
fn to_count(&self) -> usize;
async fn select(
Expand Down

0 comments on commit cdfbff6

Please sign in to comment.